Bug 15312 – Variant.get cannot access frame pointer

Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2015-11-10T02:58:04Z
Last change time
2019-12-12T11:57:49Z
Assigned to
No Owner
Creator
ryan

Comments

Comment #0 by ryan — 2015-11-10T02:58:04Z
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.