[Issue 20576] New: TemplateTypeParameter default values are not checked
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Feb 11 22:29:20 UTC 2020
https://issues.dlang.org/show_bug.cgi?id=20576
Issue ID: 20576
Summary: TemplateTypeParameter default values are not checked
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Keywords: accepts-invalid
Severity: normal
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: b2.temp at gmx.com
The following code should not compile
---
void foo(T : Object = INVALID)(T t)
{
}
void main()
{
foo(null);
}
---
because INVALID does not give a valid symbol, although it is not used in the
call.
--
More information about the Digitalmars-d-bugs
mailing list