funcsem.d: use selective import for tip - #23727
Conversation
8e50da9 to
752de17
Compare
|
Why is public |
|
Fails on my machine: Update
|
|
My monkey patch also fails. --- a/compiler/src/dmd/errors.d
+++ b/compiler/src/dmd/errors.d
@@ -580,7 +580,7 @@ __gshared DiagnosticHandler diagnosticHandler;
* ... = printf-style variadic arguments
*/
static if (__VERSION__ < 2092)
- public extern (C++) void tip(const(char)* format, ...)
+ public extern (C++) void _tip(const(char)* format, ...)
{
va_list ap;
va_start(ap, format);
@@ -588,7 +588,7 @@ static if (__VERSION__ < 2092)
va_end(ap);
}
else
- public pragma(printf) extern (C++) void tip(const(char)* format, ...)
+ public pragma(printf) extern (C++) void _tip(const(char)* format, ...)
{
va_list ap;
va_start(ap, format);
@@ -597,6 +597,8 @@ else
}
+alias tip = _tip;
+
// Encapsulates a diagnostic as described by its location, format message, and kind. |
|
The problem appears to be #19204. |
|
Workaround --- a/compiler/src/dmd/errors.d
+++ b/compiler/src/dmd/errors.d
@@ -573,13 +573,16 @@ alias DiagnosticHandler = bool delegate(const ref SourceLoc location, Color head
*/
__gshared DiagnosticHandler diagnosticHandler;
+static if (__VERSION__ < 2092)
+ version = preD2092;
+
/**
* Print a tip message with the prefix and highlighting.
* Params:
* format = printf-style format specification
* ... = printf-style variadic arguments
*/
-static if (__VERSION__ < 2092)
+version (preD2092)
public extern (C++) void tip(const(char)* format, ...)
{
va_list ap; |
|
@Herringway yes, I think you nailed it. |
752de17 to
ad8fce5
Compare
Looks like the bootstrapping compiler has a few more issues. |
|
@0xEAB yes, I just ran into the same problem. |
|
@WalterBright |
|
Why to we have a |
|
There are only two uses of it, and both look replaceable by errorSupplemental. |
|
Yeah, we could probably remove But: AFAICT we’ll run into the same issue with the |
|
Those other diagnostic functions are no longer being called. At least when my PRs are pulled! They can be dumped. |
|
tip() no longer needed |
Trying to minimize the use of errors.d