[Issue 12676] New: alias parameter attempts to interpret symbol
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Mon Apr 28 12:00:53 PDT 2014
https://issues.dlang.org/show_bug.cgi?id=12676
Issue ID: 12676
Summary: alias parameter attempts to interpret symbol
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: andrej.mitrovich at gmail.com
I think this may be a valid bug report, unless I'm misunderstanding things:
-----
class C { }
template TemplAlias1(
alias x = C // default
) { }
template TemplAlias2(
alias x : C // specialization
) { }
template TemplAlias2(
alias x : C = C // default = C, specializes to C
) { }
void main()
{
alias a = TemplAlias1!();
alias b = TemplAlias2!(C);
alias b = TemplAlias3!();
}
-----
$ dmd test.d
> test.d(12): Error: Cannot interpret C at compile time
--
More information about the Digitalmars-d-bugs
mailing list