You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CodaFi opened this issue
May 24, 2018
· 2 comments
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler in itselfcrashBug: A crash, i.e., an abnormal termination of software
SILGen is not set up to handle the case where its abstraction pattern is a single-element tuple and the substituted type is a single element. This simple piece of code crashes the result plan builder trying to lower exactly this case:
funcfoo(x: Int = 3) -> Int {
returnx
}
foo(x:)()
Unless we remove all the sources trying to form these kinds of abstraction patterns, all the parts of SILGen that just check isTuple() without checking the substType have the potential to trigger more bugs. The current representation for enum cases (and their associated thunks) are also subject to this but we will not see the consequences of this until SE-0155 is implemented.
The text was updated successfully, but these errors were encountered:
Discussed this with @belkadan and @jckarter. Consensus is that the defaults should not be considered when the function is spelled and then immediately applied in selector form.
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler in itselfcrashBug: A crash, i.e., an abnormal termination of software
Additional Detail from JIRA
md5: 451872f2cc8dcbecb5c2e00452fd8929
Issue Description:
SILGen is not set up to handle the case where its abstraction pattern is a single-element tuple and the substituted type is a single element. This simple piece of code crashes the result plan builder trying to lower exactly this case:
Unless we remove all the sources trying to form these kinds of abstraction patterns, all the parts of SILGen that just check isTuple() without checking the substType have the potential to trigger more bugs. The current representation for enum cases (and their associated thunks) are also subject to this but we will not see the consequences of this until SE-0155 is implemented.
The text was updated successfully, but these errors were encountered: