[Issue 15312] New: Variant.get cannot access frame pointer
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Mon Nov 9 18:58:04 PST 2015
https://issues.dlang.org/show_bug.cgi?id=15312
Issue ID: 15312
Summary: Variant.get cannot access frame pointer
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: normal
Priority: P1
Component: phobos
Assignee: nobody at puremagic.com
Reporter: ryan at rcorre.net
Variant.get!T fails if T is a locally declared struct with at least one method.
---
unittest {
struct S { auto i() { return 1; } }
Variant v = S();
S s = v.get!S;
}
---
Error: cannot access frame pointer of variant_get_bug.__unittestL3_1.S
If S is declared outside the unittest or contains no methods (fields are fine)
it will not fail.
--
More information about the Digitalmars-d-bugs
mailing list