File tree 2 files changed +10
-2
lines changed
compiler/src/dotty/tools/dotc/typer 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -56,8 +56,9 @@ trait TypeAssigner {
56
56
// TODO: measure the cost of using `existsPart`, and if necessary replace it
57
57
// by a `TypeAccumulator` where we have set `stopAtStatic = true`.
58
58
tp existsPart {
59
- case tp : NamedType => forbidden contains tp.symbol
60
- case tp : ThisType => forbidden contains tp.cls
59
+ case tp : TermRef => forbidden.contains(tp.symbol) || toAvoid(tp.underlying)
60
+ case tp : TypeRef => forbidden.contains(tp.symbol)
61
+ case tp : ThisType => forbidden.contains(tp.cls)
61
62
case _ => false
62
63
}
63
64
def apply (tp : Type ): Type = tp match {
Original file line number Diff line number Diff line change
1
+ object Foo {
2
+ def bar = {
3
+ val data = Map .empty[String , String ]
4
+ val list = List .empty[Map [String , String ]]
5
+ list.map(_ ++ data)
6
+ }
7
+ }
You can’t perform that action at this time.
0 commit comments