[SR-8872] Operators for local types not working #51378
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
expressions
Feature: expressions
name lookup
Area → compiler → type checker: Name lookup
operators
Feature: operators
swift 5.9
type checker
Area → compiler: Semantic analysis
unexpected behavior
Bug: Unexpected behavior or incorrect output
Environment
Apple Swift version 4.2 (swiftlang-1000.11.37.1 clang-1000.11.45.1)
Target: x86_64-apple-darwin18.0.0
Additional Detail from JIRA
md5: 3b3eafa49c174723d8b51d86c02a1242
duplicates:
Issue Description:
Static operator functions don't work with local types. See the following example:
It looks like these static operator functions are also ignored by the
Equatable
/Hashable
auto-synthesis. In the following example, auto-synthesis of the==
operator function happens even though this function was declared manually:The text was updated successfully, but these errors were encountered: