[Issue 7169] [CTFE] Assertion failure with inner struct
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Oct 5 22:55:34 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=7169
Walter Bright <bugzilla at digitalmars.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |INVALID
--- Comment #3 from Walter Bright <bugzilla at digitalmars.com> 2013-10-05 22:55:34 PDT ---
(In reply to comment #1)
> According to the spec, I don't think this is supposed to work.
It's not.
> void func2(T)(T t){
> T[2] s;
> s[0] = t;
> }
>
> static assert({
> struct InnerStruct{
> void func(){}
> }
> func2(InnerStruct());
> return true;
> }());
This also produces a correct error message:
test.d(2): Error: cannot access frame pointer of test.__lambda3.InnerStruct
test.d(10): Error: template instance test.func2!(InnerStruct) error
instantiating
Not an ICE.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list