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
[SR-2887] SILGen incorrect TupleShuffleExpr lowering #45481
Comments
Yeah, this isn't intended to be legal code any more ( |
I'm blaming the type checker even though the assertion's in SILGen because by the time we get to SILGen the types should line up. |
(and because the compiler should diagnose this, really) |
Comment by Tadeas Kriz (JIRA) @belkadan Thanks for the rename, I wasn't sure how to label it other than the SegFault 11. Also, you say that it's not legal anymore, but why does changing the |
The compiler is still using tuples to represent function arguments internally, so some cases squeak through. It's not supposed to work either, though. If you want to pass a tuple to a function, the function should take a single argument with tuple type. |
Comment by Tadeas Kriz (JIRA) That's a shame. Thanks for the info. |
'master' has a correct implementation of SE-110, except the diagnostics are still crap. You can see your code fails to typecheck:
Here is the fixed version:
However, when we fix this, the SILGen error persists:
So there's a legitimate bug here. I'll take a look. |
Hey @jckarter, I think we could solve this if SIL type lowering lowered away tuple labels. What do you think? |
So I think these conversions are legal, and in fact I think they're part of SE-0111. We want a way to add and remove tuple labels. The problem is that SILGen didn't handle this correctly when the tuple conversion appeared in argument position, because of an "different interpretation" implementation of TupleShuffleExpr in ArgEmitter. |
Environment
macOS 10.12
Xcode 8.0 (8A218a)
Additional Detail from JIRA
md5: b472bb38b280b09607f3954284081b38
is duplicated by:
Issue Description:
The following Swift 3.0 ends with Segmentation fault 11.
The problem seems to be in the names of parameters in the `data` tuple. If removed and the tuple is just {code:none}("", 0)
The text was updated successfully, but these errors were encountered: