[SR-14173] Referencing operator function '!=' on 'BinaryInteger' requires that enum with associated value conform to 'BinaryInteger' #56551
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
diagnostics QoI
Bug: Diagnostics Quality of Implementation
type checker
Area → compiler: Semantic analysis
Environment
Version 12.3 (12C33)
Additional Detail from JIRA
md5: e6ecba6fdfe08bae56e4fc622a8187eb
Issue Description:
Given an enum, where one case has an associated value:
When doing a comparison of a value v: E, as below:
the compiler puts out this error message:
Referencing operator function '!=' on 'BinaryInteger' requires that 'E' conform to 'BinaryInteger'.
This error message is misleading since at no point is any reference to BinaryInteger or its ![](= made, the underlying error being that one of the enum cases has an associated value and that the )= operator needs to be implemented or synthesised by declaring Comparable conformance.
The text was updated successfully, but these errors were encountered: