File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed
compiler/src/dotty/tools/dotc/typer Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -940,7 +940,9 @@ trait Applications extends Compatibility { self: Typer with Dynamic =>
940
940
def typedUnApply (tree : untpd.Apply , selType : Type )(implicit ctx : Context ): Tree = track(" typedUnApply" ) {
941
941
val Apply (qual, args) = tree
942
942
943
- def notAnExtractor (tree : Tree ) = errorTree(tree, NotAnExtractor (qual))
943
+ def notAnExtractor (tree : Tree ) =
944
+ if (tree.tpe.isErroneous) tree
945
+ else errorTree(tree, NotAnExtractor (qual))
944
946
945
947
/** If this is a term ref tree, try to typecheck with its type name.
946
948
* If this refers to a type alias, follow the alias, and if
Original file line number Diff line number Diff line change
1
+ class T1 {
2
+ case class Foo (x : Int , xs1 : List [String ], xs2 : List [String ])
3
+ }
4
+
5
+ object T2 {
6
+ val foo : T1 # Foo = ???
7
+
8
+ val Foo (x1, xs1, xs2) = foo // error
9
+ }
You can’t perform that action at this time.
0 commit comments