File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
src/dotty/tools/dotc/typer Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -62,9 +62,10 @@ trait TypeAssigner {
62
62
case info : ClassInfo if variance > 0 =>
63
63
val parentType = info.instantiatedParents.reduceLeft(ctx.typeComparer.andType(_, _))
64
64
def addRefinement (parent : Type , decl : Symbol ) = {
65
- val inherited = parentType.findMember(decl.name, info.cls.thisType, Private )
66
- val inheritedInfo = inherited.atSignature(decl.info.signature).info
67
- // @smarter atSignature probably wrong now; we are now missing out on types that refine the result type
65
+ val inherited =
66
+ parentType.findMember(decl.name, info.cls.thisType, Private )
67
+ .suchThat(decl.matches(_))
68
+ val inheritedInfo = inherited.info
68
69
if (inheritedInfo.exists && decl.info <:< inheritedInfo && ! (inheritedInfo <:< decl.info))
69
70
typr.echo(
70
71
i " add ref $parent $decl --> " ,
You can’t perform that action at this time.
0 commit comments