Bug 6262 – Templates which exist only inside is(typeof()) shouldn't be instantiated

Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
Other
OS
Windows
Creation time
2011-07-07T00:06:00Z
Last change time
2015-06-09T05:11:44Z
Keywords
rejects-valid
Assigned to
nobody
Creator
clugdbug

Comments

Comment #0 by clugdbug — 2011-07-07T00:06:03Z
The code below should compile with no errors. This is related to the other gagging bugs (bug 4269, bug 5932, bug 4197, bug 5996). I think that every template needs to record whether it is an investigative template or not. If it is, it shouldn't be considered to be instantiated. ----- template Compileable(int z) { bool OK;} static assert(!is(typeof( Compileable!(Bug6262!(int).bar()) ))); struct Bug6262(T) { int bar() { T.codswallop(); return 3; } }
Comment #1 by clugdbug — 2012-03-21T12:51:44Z
I reported this one twice! Fixed in 2.056. *** This issue has been marked as a duplicate of issue 6661 ***