[SR-10324] Unexpected three-term "Ambiguous reference" #52724
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
type checker
Area → compiler: Semantic analysis
Environment
macOS 10.14.4, Swift 5.0 (Apple Swift version 5.0 (swiftlang-1001.0.69.5 clang-1001.0.46.3), Target: x86_64-apple-darwin18.5.0), Xcode 10.2 (10E125)
Additional Detail from JIRA
md5: 7a22e1d470dc434136aab267a242fd68
Issue Description:
The following code infers types as expected:
But change the operator to the existing * operator on these structs, and it is unable to figure out how to proceed without excessive grouping and typing:
Both have the same associativity and precedence. There's something specific to * that seems to ruin the inferences. Is it because it has to check too many possibilities? (If so, is this limitation just a temporary pragmatic one?)
The text was updated successfully, but these errors were encountered: