summaryrefslogtreecommitdiff
path: root/test/files/run/StubErrorReturnTypeFunction.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/run/StubErrorReturnTypeFunction.scala')
-rw-r--r--test/files/run/StubErrorReturnTypeFunction.scala37
1 files changed, 37 insertions, 0 deletions
diff --git a/test/files/run/StubErrorReturnTypeFunction.scala b/test/files/run/StubErrorReturnTypeFunction.scala
new file mode 100644
index 0000000000..75a02cff63
--- /dev/null
+++ b/test/files/run/StubErrorReturnTypeFunction.scala
@@ -0,0 +1,37 @@
+object Test extends scala.tools.partest.StubErrorMessageTest {
+ def codeA = """
+ package stuberrors
+ class A
+ class AA
+ """
+
+ def codeB = """
+ package stuberrors
+
+ abstract class B {
+ def bar: String = ???
+ def foo: A = new A
+ def baz: String = ???
+ }
+ """
+
+ def userCode = """
+ package stuberrors
+
+ abstract class C extends App {
+ val b = new B {}
+
+ // Use other symbols in the meanwhile
+ val aa = new AA
+ val dummy = 1
+ println(dummy)
+
+ // Should blow up
+ b.foo
+ }
+ """
+
+ def removeFromClasspath(): Unit = {
+ removeClasses("stuberrors", List("A"))
+ }
+}