Bug 23647 – Better error message on untyped function parameter
Status
RESOLVED
Resolution
INVALID
Severity
enhancement
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2023-01-22T17:38:18Z
Last change time
2023-01-23T01:06:32Z
Assigned to
No Owner
Creator
Grim Maple
Comments
Comment #0 by grimmaple95 — 2023-01-22T17:38:18Z
```
void foo(int i, j)
{
writeln(i, " ", j);
}
```
This code generates a following error:
onlineapp.d(3): Error: undefined identifier `j`
It's probably better to say something like `Expected type, not variable`
Comment #1 by b2.temp — 2023-01-23T01:06:32Z
`j` is well a type but it is resolved to nothing. So the parameter is not untyped, it's unamed.