Bug 7710 – Segmentation fault when assigning function to delegate variable

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2012-03-14T13:05:00Z
Last change time
2012-04-21T06:56:47Z
Assigned to
nobody
Creator
alex

Comments

Comment #0 by alex — 2012-03-14T13:05:08Z
I have no idea if it's valid code, but it does crash DMD. alexrp@alexrp ~/Projects/tests $ cat test.d void foo() { } void main() { void delegate() f = foo; } alexrp@alexrp ~/Projects/tests $ dmd test.d Segmentation fault
Comment #1 by lovelydear — 2012-04-21T06:51:07Z
With 2.059 Win32: PS E:\DigitalMars\dmd2\samples> rdmd bug.d bug.d(7): Error: expression foo() is void and has no value