-
-
Notifications
You must be signed in to change notification settings - Fork 655
Issue 5498 - array of elements of subtypes of a common supertype #684
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
Conversation
Any reason this hasn't gone through? |
Well, it fails in the autotester. My guess is that something special needs to be done for template lambdas. |
Minor: Fix a link to TickDuration in std.datetime docs
With the following code: The issue is that in If this is avoided by excluding TOKfunction expressions, @9rnsr Are there existing functions that could be used to do the type merging for function literals, or does it need to be done from scratch? |
In basic, if a type |
It seems this change is correct, so I'll leave this pull open pending typeMerge improvements. |
@yebblies time to revive this? |
This pull is correct, but it will have to wait until typeMerge is updated to merge function literals. |
@yebblies ping? |
@yebblies What's the current status of this? As you saw, this came up again in https://d.puremagic.com/issues/show_bug.cgi?id=12283 |
arrayExpressionsToCommonType incorrectly uses condexp.e2->type rather than condexp.type to determine the common type of the array.
Here's a hack that keeps the old behavior when merging two |
Hmm, actually seems to work. |
no guts, no glory |
Issue 5498 - array of elements of subtypes of a common supertype
@andralex Did you merge this based on trust or are you actually confident this is the correct way to solve the problem? Either way, thanks! |
Some of both... |
For the case, I opened an enhancement issue 12605, and as its first step I opened a refactoring PR #3473. |
arrayExpressionsToCommonType incorrectly uses condexp.e2->type rather than condexp.type to determine the common type of the array.
http://d.puremagic.com/issues/show_bug.cgi?id=5498