You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remove illogical conditions that suppressed certain checks. Replace them
by a separate condition that certain override checks are suppressed if the
types of the members do not match (i.e. it's just the signatures that match
but not the types). In that case, we have arguably overshot with declaring
an override. Bridge generation is also suppressed in this case. Scala 2 behaves
effectively the same way, by never taking signatures into account.
|clashes with definition of the member itself; both have erased type ${info(member)(using elimErasedCtx)}."""",
78
78
bridgePosFor(member))
79
79
}
80
-
elseif (!bridgeExists)
80
+
elseif!inContext(preErasureCtx)(site.memberInfo(member).matches(site.memberInfo(other))) then
81
+
// Neither symbol signatures nor pre-erasure types seen from root match; this means
82
+
// according to Scala 2 semantics there is no override.
83
+
// A bridge might introduce a classcast exception.
84
+
// Example where this was observed: run/i12828a.scala and MapView in stdlib213
85
+
report.log(i"suppress bridge in $root for ${member} in ${member.owner} and ${other.showLocated} since member infos ${site.memberInfo(member)} and ${site.memberInfo(other)} do not match")
0 commit comments