Bug 12094 – typeof(null) should convert to reference types
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-02-06T22:21:00Z
Last change time
2014-02-11T03:31:08Z
Keywords
pull, rejects-valid
Assigned to
yebblies
Creator
yebblies
Comments
Comment #0 by yebblies — 2014-02-06T22:21:20Z
void main()
{
auto n = null;
int *a;
int[int] b;
int[] c;
auto u = true ? null : a;
auto v = true ? null : b;
auto w = true ? null : c;
auto x = true ? n : a; // error
auto y = true ? n : b; // error
auto z = true ? n : c; // error
a = n;
b = n; // error
c = n;
}