summaryrefslogtreecommitdiff
path: root/test/files/run/StubErrorReturnTypePolyFunction.scala
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan@lightbend.com>2017-03-27 17:11:09 -0700
committerGitHub <noreply@github.com>2017-03-27 17:11:09 -0700
commit03d5f4ee9242f048e86ad9196740b04852c3b738 (patch)
tree2f629f7e8cd6bc22bf839516e36a9d631e9351b9 /test/files/run/StubErrorReturnTypePolyFunction.scala
parent99f41a15d16be6707b6c33b5a16093e016db81eb (diff)
parent9cfa239e776c2ce6bd7447fd9de8436c5fe167ab (diff)
downloadscala-03d5f4ee9242f048e86ad9196740b04852c3b738.tar.gz
scala-03d5f4ee9242f048e86ad9196740b04852c3b738.tar.bz2
scala-03d5f4ee9242f048e86ad9196740b04852c3b738.zip
Merge pull request #5804 from jvican/stub-errors-2.11.8
Backport 2.11.9: Improve stub error messages (SCP-009 proposal)
Diffstat (limited to 'test/files/run/StubErrorReturnTypePolyFunction.scala')
-rw-r--r--test/files/run/StubErrorReturnTypePolyFunction.scala37
1 files changed, 37 insertions, 0 deletions
diff --git a/test/files/run/StubErrorReturnTypePolyFunction.scala b/test/files/run/StubErrorReturnTypePolyFunction.scala
new file mode 100644
index 0000000000..8345aaade0
--- /dev/null
+++ b/test/files/run/StubErrorReturnTypePolyFunction.scala
@@ -0,0 +1,37 @@
+object Test extends scala.tools.partest.StubErrorMessageTest {
+ def codeA = """
+ package stuberrors
+ class A
+ class AA
+ """
+
+ def codeB = """
+ package stuberrors
+
+ class B {
+ def foo[T <: A]: T = ???
+ }
+
+ class D extends A
+ """
+
+ 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[D]
+ }
+ """
+
+ def removeFromClasspath(): Unit = {
+ removeClasses("stuberrors", List("A"))
+ }
+}