[SR-12112] Accepts Invalid, Tuple labels with different order are considered the same. #54548
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
Environment
Default toolchain of Xcode 11.3.1 (11C504)
and
Swift Development Snapshot 2020-01-21 (a)
Additional Detail from JIRA
md5: 0cf428a84023959ac294b148f75086f4
Issue Description:
( From this post: https://forums.swift.org/t/tuples-conform-to-equatable/32559/39 )
Expected behavior: The labels of `a` should be considered different from the labels of `b`, because tuple element order matters, and thus the assignments should be invalid and the error should be the same as if eg `b` had been `(p: 4, q: 2)`.
Observed behavior: The labels of `a` are considered the same as the labels of `b`, as if tuple element order didn't matter, and thus the compiler accepts invalid code.
The text was updated successfully, but these errors were encountered: