From 4902c84cb049764dddc263976affa80bd6d44997 Mon Sep 17 00:00:00 2001 From: Adriaan Moors Date: Tue, 7 Oct 2014 17:35:47 +0200 Subject: SI-8890 handle reference to overload with error When buffering, we must report the ambiguity error to avoid a stack overflow. When the error refers to erroneous types/symbols, we don't report it directly to the user, because there will be an underlying error that's the root cause. --- test/files/neg/t8890.check | 4 ++++ test/files/neg/t8890.scala | 11 +++++++++++ 2 files changed, 15 insertions(+) create mode 100644 test/files/neg/t8890.check create mode 100644 test/files/neg/t8890.scala (limited to 'test/files/neg') diff --git a/test/files/neg/t8890.check b/test/files/neg/t8890.check new file mode 100644 index 0000000000..1b69d6cf30 --- /dev/null +++ b/test/files/neg/t8890.check @@ -0,0 +1,4 @@ +t8890.scala:6: error: not found: type Str + def bar(x: Str): Unit = ??? + ^ +one error found diff --git a/test/files/neg/t8890.scala b/test/files/neg/t8890.scala new file mode 100644 index 0000000000..cbdeb11d43 --- /dev/null +++ b/test/files/neg/t8890.scala @@ -0,0 +1,11 @@ +package foo + +class A { + /** The other */ + def bar(x: Int): Unit = ??? + def bar(x: Str): Unit = ??? +} + +class B { + (new A).bar(0) +} \ No newline at end of file -- cgit v1.2.3