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 =>
941941 val Apply (qual, args) = tree
942942
943943 def notAnExtractor (tree : Tree ) =
944- if (tree.tpe.isErroneous) tree
944+ if (! tree.tpe.isError && tree.tpe.isErroneous) tree
945945 else errorTree(tree, NotAnExtractor (qual))
946946
947947 /** 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 {
15541554 @ Test def notAnExtractor () =
15551555 checkMessagesAfter(FrontEnd .name) {
15561556 """
1557- | class Foo
1557+ | trait Foo
1558+ | object Foo
15581559 | object Test {
15591560 | def test(foo: Foo) = foo match {
15601561 | case Foo(name) => ???
You can’t perform that action at this time.
0 commit comments