http://d.puremagic.com/issues/show_bug.cgi?id=7136
Summary: alias this lookup should run before merging modifiers
of both sides.
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: [email protected]
ReportedBy: [email protected]
--- Comment #0 from Kenji Hara <[email protected]> 2011-12-19 03:19:30 PST ---
Test cases:
void test()
{
struct X
{
Object get() immutable { return null; }
alias get this;
}
immutable(X) x;
Object y;
static assert( is(typeof(1?x:y) == Object)); // fails
static assert(!is(typeof(1?x:y) == const(Object))); // fails
struct A
{
int[] get() immutable { return null; }
alias get this;
}
immutable(A) a;
int[] b;
static assert( is(typeof(1?a:b) == int[])); // fails
static assert(!is(typeof(1?a:b) == const(int[]))); // fails
}
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------