Bug 10808 – [REG2.064a] Incorrect typeid template argument should report error

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-08-12T06:28:00Z
Last change time
2013-08-17T23:51:37Z
Keywords
accepts-invalid, pull
Assigned to
nobody
Creator
k.hara.pg

Comments

Comment #0 by k.hara.pg — 2013-08-12T06:28:16Z
This code fail to compile with 2.063, but doesn't with git head. template Tuple(alias TPL) { alias TPL Tuple; } auto K = Tuple!(typeid(char)); With 2.063: test.d(5): Error: expression & D10TypeInfo_a6__initZ is not a valid template value argument test.d(5): Error: template instance test.Tuple!(& D10TypeInfo_a6__initZ) error instantiating With git head: (no error)
Comment #1 by k.hara.pg — 2013-08-12T07:48:29Z
Comment #2 by github-bugzilla — 2013-08-17T23:31:40Z
Commit pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/62b152bc47e325c723b6af2507ad8db7d2ee9a5e fix Issue 10808 - [REG2.064a] Incorrect typeid template argument should report error By the commit 1fdbfa65b8568837567533fb79d1b56ab88465ab, mangled name of template instance is lazily calculated and Expression::toMangleBuffer call is sometimes avoided. Then the case fail235.d was silently broken.