[SR-13020] Concrete associated type leaks through opaque type #55465
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
not a bug
Resolution → not a bug: Reported as a bug but turned out to be expected behavior or programmer error
opaque types
Feature → types: opaque types
Additional Detail from JIRA
md5: 0f390e9405cf0f9b08177e5e6fe29492
Issue Description:
Consider the following code:
I don't think this should compile, but it does! `x` and `y` are different containers, how/why is the compiler able to tell that the different calls to `f` are returning opaque types with the same associated type? I think the only information that should be accessible is that the element is Equatable. This means that `x[0] == x[1]` would compile but `x[0] == y[0]` would not. It seems like information about the concrete type is "leaking through" and being used to check the call to `==`.
The text was updated successfully, but these errors were encountered: