File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
compiler/src/dotty/tools/dotc/ast Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -659,10 +659,8 @@ trait TypedTreeInfo extends TreeInfo[Type] { self: Trees.Instance[Type] =>
659659 rname == tree.name || hasRefinement(parent)
660660 case tp : TypeProxy =>
661661 hasRefinement(tp.underlying)
662- case tp : OrType =>
662+ case tp : AndOrType =>
663663 hasRefinement(tp.tp1) || hasRefinement(tp.tp2)
664- case tp : AndType =>
665- hasRefinement(tp.tp1) && hasRefinement(tp.tp2)
666664 case _ =>
667665 false
668666 }
Original file line number Diff line number Diff line change 1+ class Cont [A0 ](x0 : A0 ) { type A = A0 ; val x : A = x0 }
2+ object Test {
3+ val c : { type A ; val x : A } & { type A = Int } = new Cont (1 )
4+ println(c.x : Int ) // error: not an instance of Selectable
5+ }
You can’t perform that action at this time.
0 commit comments