https://issues.dlang.org/show_bug.cgi?id=17864
Issue ID: 17864
Summary: POD struct not equivalent to primitive type in
comparison
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: minor
Priority: P1
Component: dmd
Assignee: [email protected]
Reporter: [email protected]
struct A { int a; }
void g()
{
shared A a;
A b;
a=b; //converts
assert(a==b); //fail
}
Error: incompatible types for ((a) is (b)): 'shared(A)' and 'A'
Works for immutable. Is it an oversight?
--
