Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 6939 & 6940 & 7136 - Fix type combination #571

Merged
merged 3 commits into from
Dec 20, 2011

Conversation

9rnsr
Copy link
Contributor

@9rnsr 9rnsr commented Dec 19, 2011

Issue 6939 - wrong type qualifier combination
Issue 6940 - immutable(int_)_/immutable(int)* and int* do not combine
Issue 7136 - alias this lookup should run before merging modifiers of both sides.

const int[] c;
static assert( is(typeof(1?a:b) == shared(const(int))[])); // pass (ok)
static assert(!is(typeof(1?a:b) == const(int)[])); // pass (ok)
static assert(!is(typeof(1?x:z))); // fail
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be
static assert(!is(typeof(1?a:c)));

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Fixed.

@tgehr
Copy link
Contributor

tgehr commented Dec 19, 2011

Does this fix the case (1?immutable(int)_ : int_) -> const(int*)* that is briefly discussed under 6940? It does not occur in the tests.

@9rnsr
Copy link
Contributor Author

9rnsr commented Dec 20, 2011

Wow, I had forgotten it. Added fix and test case.

WalterBright added a commit that referenced this pull request Dec 20, 2011
Issue 6939 & 6940 & 7136 - Fix type combination
@WalterBright WalterBright merged commit 06fe1ce into dlang:master Dec 20, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants