[Issue 19668] Using init instead of construction causes crash if type is parameterized on alias to function that accesses frame
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Jan 9 15:33:55 UTC 2023
https://issues.dlang.org/show_bug.cgi?id=19668
Nick Treleaven <nick at geany.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |nick at geany.org
Resolution|--- |INVALID
--- Comment #2 from Nick Treleaven <nick at geany.org> ---
main.func captures a runtime variable `count` whose address is not known at
compile-time. S.init must be known at compile-time. So using S.init will cause
a null context pointer for func instead of one pointing to main.count. You need
to call S's constructor, not use S.init.
--
More information about the Digitalmars-d-bugs
mailing list