aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorodersky <odersky@gmail.com>2016-11-21 19:00:19 +0100
committerGitHub <noreply@github.com>2016-11-21 19:00:19 +0100
commit5b409515613173970d44a21978b04432cd01b73d (patch)
tree580409cc8e02bc2cfba3d5b94f62daa492ff2e49 /tests
parent601a286b1c1eb7f0bbea64609a7d07ed40f02118 (diff)
parenta2b1e601142e66255c252bf0584d2fc5ceb46b07 (diff)
downloaddotty-5b409515613173970d44a21978b04432cd01b73d.tar.gz
dotty-5b409515613173970d44a21978b04432cd01b73d.tar.bz2
dotty-5b409515613173970d44a21978b04432cd01b73d.zip
Merge pull request #1634 from dotty-staging/change-tasty-pos-ctd
Towards correct positions in TASTY types
Diffstat (limited to 'tests')
-rw-r--r--tests/neg/i1605.scala2
-rw-r--r--tests/pickling/annot.scala12
-rw-r--r--tests/pickling/pickleTypes.scala13
-rw-r--r--tests/pickling/simple.scala6
4 files changed, 32 insertions, 1 deletions
diff --git a/tests/neg/i1605.scala b/tests/neg/i1605.scala
index 776f2df47..f5fd9f29b 100644
--- a/tests/neg/i1605.scala
+++ b/tests/neg/i1605.scala
@@ -1,5 +1,5 @@
object Test {
def foo = inlineMe
- inline def inlineMe = 1 + x // error
+ inline def inlineMe = 1 + x2233 // error
}
diff --git a/tests/pickling/annot.scala b/tests/pickling/annot.scala
new file mode 100644
index 000000000..d20a6cbf4
--- /dev/null
+++ b/tests/pickling/annot.scala
@@ -0,0 +1,12 @@
+trait Type
+class RefinedType extends Type
+
+
+object TestAnnot {
+ def toText(tp: Type) = tp match {
+ case tp: RefinedType =>
+ val parent :: (refined: List[RefinedType @unchecked]) = ???
+ ???
+ }
+ val xs: List[RefinedType @unchecked] = ???
+}
diff --git a/tests/pickling/pickleTypes.scala b/tests/pickling/pickleTypes.scala
new file mode 100644
index 000000000..ef322816a
--- /dev/null
+++ b/tests/pickling/pickleTypes.scala
@@ -0,0 +1,13 @@
+object pickleTypes {
+
+ abstract class C { type T; val x: T; def f: T; def g(y: T): T; def h[U](z: U, y: T): U }
+
+ val x1: Int = ???
+ val x2: List[List[Int]] = ???
+ val x3: C { type T <: C } = ???
+ val x4: C { type T = Int; val x: Int } = ???
+ val x5: C { type T = String; def f: String; def g(y: String): String } = ???
+ val x6: C { type T = String; def f: String; def g(y: String): String; def h[U](z: U, y: T): U } = ???
+
+
+}
diff --git a/tests/pickling/simple.scala b/tests/pickling/simple.scala
new file mode 100644
index 000000000..243b41117
--- /dev/null
+++ b/tests/pickling/simple.scala
@@ -0,0 +1,6 @@
+object Simple {}
+/*class Simple {
+ val x = 3
+ val y: String = ""
+}*/
+