Bug 2605 – Null literal is not implicitly castable to const return type

Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2009-01-23T12:12:00Z
Last change time
2015-06-09T01:21:02Z
Keywords
rejects-valid
Assigned to
bugzilla
Creator
samukha

Comments

Comment #0 by samukha — 2009-01-23T12:12:10Z
class C {} const(C) foo() { return null; } Error: e2ir: cannot cast from void* to const(C)
Comment #1 by gide — 2009-05-13T06:35:09Z
Works in DMD 2.030.