-
-
Notifications
You must be signed in to change notification settings - Fork 424
Change TypeInfo.next to inout function #359
Conversation
Fails on Darwin32 due to a compiler bug... |
Why? |
The OSX32 bug happens when compiling rt.lifetime and I've reduced it to this. cat > bug.d << CODE
void bug()
{
auto sizeelem = typeid(int).next.tsize;
}
CODE
dmd -c -m32 -O -release -inline bug.d |
OK, it's an unrelated bug Bugzilla 9096. |
Does this still fail on OS X? |
Yes, the problem is related to the inout addition. auto ti = typeid(int).next;
auto sizeelem = ti.tsize; But accessing a TypeInfo field of a return type or an array element is pretty common, so merging this pull without fixing Bugzilla 9096 first might break a lot of code. |
Bug 9231 has already fixed, so attribute inference now works correctly with inout method.
By removing workaround for bug 9231, the symptom of bug 9096 is now disappeared. But I don't know why that... |
Well... I suppose we can merge this then. |
Change TypeInfo.next to inout function
@9rnsr: if we have a passing unittest for bug 9096, then you may want to close it as resolved. |
@andralex Sorry, I don't know whether the bug 9096 is resolved. It had fortunately just gone from the test result for this pull. |
In 2.060, following code has changed to not to work.
This change fixes the problem.