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 8262 - ICE(mtype.c) alias this to alias of an expression tuple #4195

Merged
merged 2 commits into from
Dec 12, 2017

Conversation

rainers
Copy link
Member

@rainers rainers commented Dec 6, 2014

https://issues.dlang.org/show_bug.cgi?id=8262

This PR doesn't change anything about what should happen with a tuple being aliased to "this", but merely avoids the crash. The net result seems to be that implicite conversions don't take place.

This is blocking dlang/druntime#1057 ATM.

@WalterBright
Copy link
Member

I am not comfortable with changes that "merely avoid the crash". It suggests not understanding what the actual problem is. I'd like Kenji to review this, the RECtracing thing is his design.

@rainers
Copy link
Member Author

rainers commented Dec 12, 2014

I am not comfortable with changes that "merely avoid the crash". It suggests not understanding what the actual problem is. I'd like Kenji to review this, the RECtracing thing is his design.

I'm not happy with it, either. The problem is that alias this to expression or mixed tuples is not well defined yet, though it sometimes works. When compiled with dlang/druntime#1057, this test crashes: https://github.com/D-Programming-Language/dmd/blob/master/test/runnable/aliasthis.d#L1269

What is supposed to happen when aliasing to Tuple!(1,int,"foo")? In pull request #4025, you proposed " the tuple must be one element, and it is resolved to that one element, otherwise an error.", but aliasthis.d shows examples that work differently, e.g. test9873.

@0joshuaolson1
Copy link

alias this to expression or mixed tuples is not well defined yet

Is this a comment about the D language specification?

@JinShil JinShil added the Blocking Other Work review and pulling should be a priority label Dec 6, 2017
@andralex
Copy link
Member

andralex commented Dec 7, 2017

@rainers status?

@dlang-bot
Copy link
Contributor

Thanks for your pull request, @rainers!

Bugzilla references

Auto-close Bugzilla Description
8262 ICE(mtype.c) alias this to alias of an expression tuple

⚠️⚠️⚠️ Warnings ⚠️⚠️⚠️

@rainers
Copy link
Member Author

rainers commented Dec 9, 2017

@rainers status?

redone now and added test case. This still just follows the example of other code ignoring alias this if aliasthisof() returns null instead of crashing.

@andralex
Copy link
Member

@rainers please mind the test failures thx!

@dlang-bot dlang-bot merged commit 4616d44 into dlang:master Dec 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-merge Blocking Other Work review and pulling should be a priority Bug Fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants