[Issue 18960] Function parameter requires name with default value
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Feb 18 13:12:44 UTC 2019
https://issues.dlang.org/show_bug.cgi?id=18960
Tiberiu Lepadatu <tiberiulepadatu14 at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |tiberiulepadatu14 at gmail.com
--- Comment #1 from Tiberiu Lepadatu <tiberiulepadatu14 at gmail.com> ---
Hello!
I have written a solution that checks if "ai" is not null at
https://github.com/dlang/dmd/blob/master/src/dmd/parse.d#L3014 at if it is, it
throws an error; but this creates an error message for the following program:
void main() {
import std.stdio;
writefln("%i", 3);
}
The error is:
/druntime/import/core/internal/traits.d(140): Error: TFunction parameter
requires name with default value at == __InoutWorkaroundStruct ai == (null)
/druntime/import/core/internal/traits.d(141): Error: TFunction parameter
requires name with default value at == __InoutWorkaroundStruct ai == (null)
>From what I have gathered the at is where the type of the parameter is stored.
Why is the line 140 different?
(I am a newcomer so please do not judge the question)
PS: I did not find a solution using the line that you have provided because
there are no parameters checked in that line in the parser. Thank you in
advance!
--
More information about the Digitalmars-d-bugs
mailing list