D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 4469 - ICE(mtype.c) function literals class member
Summary: ICE(mtype.c) function literals class member
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: x86 Windows
: P2 normal
Assignee: No Owner
URL:
Keywords: ice-on-invalid-code
Depends on:
Blocks:
 
Reported: 2010-07-16 04:24 UTC by bearophile_hugs
Modified: 2010-10-30 06:38 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description bearophile_hugs 2010-07-16 04:24:49 UTC
D2 code:

import std.traits: ReturnType;
struct Foo {
    ReturnType!({}) bar;
}
void main() {}


dmd 2.047 prints:
test.d(3): Error: delegate test.Foo.__dgliteral1 function literals cannot be class members
ty = 37
Assertion failure: '0' on line 141 in file 'mtype.c'
Comment 1 Don 2010-10-30 06:38:27 UTC
Fixed DMD2.048