diff options
Diffstat (limited to 'test/files/neg/t7501')
-rw-r--r-- | test/files/neg/t7501/t7501_1.scala | 12 | ||||
-rw-r--r-- | test/files/neg/t7501/t7501_2.scala | 5 |
2 files changed, 17 insertions, 0 deletions
diff --git a/test/files/neg/t7501/t7501_1.scala b/test/files/neg/t7501/t7501_1.scala new file mode 100644 index 0000000000..323c327623 --- /dev/null +++ b/test/files/neg/t7501/t7501_1.scala @@ -0,0 +1,12 @@ +object Test2 { + def test[X](name: String) = 12 +} +class strangeTest(x: Int) extends scala.annotation.StaticAnnotation + +trait A { + // When picking the type of `test`, the value parameter + // `x` was pickled with the owner `trait A`. On unpickling, + // it was taken to be a member! + @strangeTest(Test2.test("test")) + def test(x: String): Unit +} diff --git a/test/files/neg/t7501/t7501_2.scala b/test/files/neg/t7501/t7501_2.scala new file mode 100644 index 0000000000..044caea3c3 --- /dev/null +++ b/test/files/neg/t7501/t7501_2.scala @@ -0,0 +1,5 @@ +object Test { + def foo(a: A) = a.name + + type TP = X // already failed before this fix +} |