[Issue 21551] New: string literal followed by address expression pass the parsing phase
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Jan 15 11:09:22 UTC 2021
https://issues.dlang.org/show_bug.cgi?id=21551
Issue ID: 21551
Summary: string literal followed by address expression pass the
parsing phase
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Keywords: accepts-invalid
Severity: enhancement
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: b2.temp at gmx.com
this seems to be accepted by the parser and is rejected during semantic
---
module runnable;
void stuff(string){}
void main()
{
"a" &stuff;
}
---
with
> /tmp/temp_7F751D15BED0.d:7:10: Error: function `runnable.stuff(string _param_0)` is not callable using argument types `()`
--
More information about the Digitalmars-d-bugs
mailing list