File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
src/dotty/tools/dotc/typer
test/dotty/tools/dotc/reporting Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -941,7 +941,7 @@ trait Applications extends Compatibility { self: Typer with Dynamic =>
941
941
val Apply (qual, args) = tree
942
942
943
943
def notAnExtractor (tree : Tree ) =
944
- if (tree.tpe.isErroneous) tree
944
+ if (! tree.tpe.isError && tree.tpe.isErroneous) tree
945
945
else errorTree(tree, NotAnExtractor (qual))
946
946
947
947
/** If this is a term ref tree, try to typecheck with its type name.
Original file line number Diff line number Diff line change @@ -1554,7 +1554,8 @@ class ErrorMessagesTests extends ErrorMessagesTest {
1554
1554
@ Test def notAnExtractor () =
1555
1555
checkMessagesAfter(FrontEnd .name) {
1556
1556
"""
1557
- | class Foo
1557
+ | trait Foo
1558
+ | object Foo
1558
1559
| object Test {
1559
1560
| def test(foo: Foo) = foo match {
1560
1561
| case Foo(name) => ???
You can’t perform that action at this time.
0 commit comments