Bug 11675 – [ICE] (expression.c line 9217) With text() of a Typedef
Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2013-12-03T18:59:51Z
Last change time
2018-03-13T12:18:15Z
Keywords
rejects-valid
Assigned to
No Owner
Creator
bearophile_hugs
Comments
Comment #0 by bearophile_hugs — 2013-12-03T18:59:51Z
import std.typecons: Typedef;
import std.string: text;
alias Foo = Typedef!int;
void main() {
text(Foo(1));
}
DMD 2.065alpha gives:
Assertion failure: 't1->ty == Tfunction' on line 9217 in file 'expression.c'
Comment #1 by Bastiaan — 2018-03-13T12:18:15Z
This seems to work for versions 2.065.0 - 2.066.0. It works for later versions too, after importing std.conv instead of std.string.
https://run.dlang.io/is/FrkAB9
Tested locally on Windows too, dmd 2.079.0.