[Issue 12070] New: Variant opCall not static
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Feb 3 13:17:16 PST 2014
https://d.puremagic.com/issues/show_bug.cgi?id=12070
Summary: Variant opCall not static
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: regression
Priority: P2
Component: Phobos
AssignedTo: nobody at puremagic.com
ReportedBy: Jesse.K.Phillips+D at gmail.com
--- Comment #0 from Jesse Phillips <Jesse.K.Phillips+D at gmail.com> 2014-02-03 13:17:12 PST ---
In previous versions the following code compiled because there was no opCall:
import std.variant;
void main() {
auto v = Variant();
}
Error: need 'this' for 'opCall' of type '@trusted VariantN!(20u)()'
The opCall isn't static so it requires a this. A work around seems to be to add
null:
Variant(null);
--
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list