[Issue 24116] New: no return not accepted as argument of a template value parameter
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Aug 27 08:04:30 UTC 2023
https://issues.dlang.org/show_bug.cgi?id=24116
Issue ID: 24116
Summary: no return not accepted as argument of a template value
parameter
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Keywords: rejects-valid
Severity: normal
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: b2.temp at gmx.com
For the following code
```
int v(int e)()
{
return e + 0;
}
int main()
{
return v!(noreturn)();
}
```
dmd exits with:
> temp_7F361AD45870.d:8:12: Error: template instance `v!(noreturn)` does not match template declaration `v(int e)()`
But noreturn is supposed to implictly convert to `int`
--
More information about the Digitalmars-d-bugs
mailing list