Bug 6763 – Using TypeTuple with (const/in/ref etc.) changes it forever

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
Other
OS
Windows
Creation time
2011-10-03T22:32:00Z
Last change time
2015-06-09T05:11:48Z
Keywords
accepts-invalid, ice-on-valid-code, patch, rejects-valid, wrong-code
Assigned to
nobody
Creator
verylonglogin.reg

Comments

Comment #0 by verylonglogin.reg — 2011-10-03T22:32:03Z
If any two from r/i/o functions are uncommented a compiler try to add mutually exclusive storage classes and fails with "Assertion failure: '0' on line 8438 in file 'mtype.c'" --- template TypeTuple(TList...) { alias TList TypeTuple; } alias TypeTuple!(int) T; void f( T) { } void c(const T) { } ///T now is (const int) void r(ref T) { } ///T now is(ref const int) /* void i(in T) { } ///Uncomment to get an Assertion failure in 'mtype.c' void o(out T) { } ///ditto */ void main() { f(0); //With D2: Error: function main.f ((ref const const(int) _param_0)) is not callable using argument types (int) } ---
Comment #1 by k.hara.pg — 2011-10-04T08:46:42Z
Comment #2 by bugzilla — 2011-12-11T12:55:08Z
Comment #3 by verylonglogin.reg — 2012-10-30T06:54:48Z
Is it fixed for D1?