[Issue 16050] New: Template type parameter "action at at a distance"
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Fri May 20 14:48:24 PDT 2016
https://issues.dlang.org/show_bug.cgi?id=16050
Issue ID: 16050
Summary: Template type parameter "action at at a distance"
Product: D
Version: D2
Hardware: All
OS: Linux
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: thomas.bockman at gmail.com
"vit" on the D.lang forum found this bug:
http://forum.dlang.org/post/fiaqxpgaxttgifnkyzpk@forum.dlang.org
Starting with the following declarations:
---
class Type { }
class Foo(T : const T) {
alias X = T;
}
alias Bar(T : Foo!Ts, Ts...) = Ts[0];
---
This will print "immutable(Type):
---
alias F1 = Foo!(immutable(Type));
alias F2 = Foo!Type;
pragma(msg, "Bar: ", Bar!(Foo!Type)); // Bar: immutable(Type)
---
But this will print just "Type":
---
alias F1 = Foo!Type;
alias F2 = Foo!(immutable(Type));
pragma(msg, "Bar: ", Bar!(Foo!Type)); // Bar: Type
---
The type of Bar!(Foo!Type) should not be effected by the existence or order of
F1 and F2 above.
--
More information about the Digitalmars-d-bugs
mailing list