File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
src/dotty/tools/dotc/typer Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -79,7 +79,9 @@ object ProtoTypes {
79
79
override def isMatchedBy (tp1 : Type )(implicit ctx : Context ) = {
80
80
name == nme.WILDCARD || {
81
81
val mbr = tp1.member(name)
82
- def qualifies (m : SingleDenotation ) = compat.normalizedCompatible(m.info, memberProto)
82
+ def qualifies (m : SingleDenotation ) =
83
+ memberProto.isRef(defn.UnitClass ) ||
84
+ compat.normalizedCompatible(m.info, memberProto)
83
85
mbr match { // hasAltWith inlined for performance
84
86
case mbr : SingleDenotation => mbr.exists && qualifies(mbr)
85
87
case _ => mbr hasAltWith qualifies
Original file line number Diff line number Diff line change @@ -7,5 +7,5 @@ object Test {
7
7
}
8
8
def f = extraListener.h
9
9
}
10
- def main (args : Array [String ]) : Unit = (new Editor ).f
10
+ def main (args : Array [String ]): Unit = (new Editor ).f
11
11
}
You can’t perform that action at this time.
0 commit comments