[SR-2041] subtyping of tuple expressions is not implemented properly, causing compiler crashes #44650
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
crash
Bug: A crash, i.e., an abnormal termination of software
type checker
Area → compiler: Semantic analysis
Environment
Swift 2.2
Additional Detail from JIRA
md5: a471581c51906b9e1b69b04097bac50d
Issue Description:
Here is one example of code that will crash the compiler:
I believe this is caused by an inconsistent application of the principle of subtyping to the components of tuples. This inconsistency is illustrated by these examples:
This inconsistency is likely also responsible for the rather comical output when you compile and run this code:
Here is the output I get:
The text was updated successfully, but these errors were encountered: