summaryrefslogtreecommitdiff
path: root/test/files/pos
diff options
context:
space:
mode:
authorAleksandar Prokopec <axel22@gmail.com>2012-03-21 15:21:00 +0100
committerAleksandar Prokopec <axel22@gmail.com>2012-03-21 15:21:00 +0100
commit0321df7292018d1e7408ef9ad193c8fc7bf4765d (patch)
tree6152d94c2b614bb823f75d864c2a729e8221248a /test/files/pos
parent13a325b126ac6f2f5d2e7d1fc2c008d012367430 (diff)
parentf6c050e8cfa5bd1ee4bbb3434086d2ae2d35e5f7 (diff)
downloadscala-0321df7292018d1e7408ef9ad193c8fc7bf4765d.tar.gz
scala-0321df7292018d1e7408ef9ad193c8fc7bf4765d.tar.bz2
scala-0321df7292018d1e7408ef9ad193c8fc7bf4765d.zip
Merge branch 'master' into feature/pc-execution-contexts
Diffstat (limited to 'test/files/pos')
-rw-r--r--test/files/pos/anyval-children.flags1
-rw-r--r--test/files/pos/rangepos.flags1
-rw-r--r--test/files/pos/rangepos.scala5
-rw-r--r--test/files/pos/t1050.scala2
-rw-r--r--test/files/pos/t5545/S_1.scala4
-rw-r--r--test/files/pos/t5545/S_2.scala4
-rw-r--r--test/files/pos/t715/meredith_1.scala2
-rw-r--r--test/files/pos/trait-parents.scala16
8 files changed, 33 insertions, 2 deletions
diff --git a/test/files/pos/anyval-children.flags b/test/files/pos/anyval-children.flags
new file mode 100644
index 0000000000..80fce051e6
--- /dev/null
+++ b/test/files/pos/anyval-children.flags
@@ -0,0 +1 @@
+-Ystop-after:erasure \ No newline at end of file
diff --git a/test/files/pos/rangepos.flags b/test/files/pos/rangepos.flags
new file mode 100644
index 0000000000..fcf951d907
--- /dev/null
+++ b/test/files/pos/rangepos.flags
@@ -0,0 +1 @@
+-Yrangepos \ No newline at end of file
diff --git a/test/files/pos/rangepos.scala b/test/files/pos/rangepos.scala
new file mode 100644
index 0000000000..623b096acb
--- /dev/null
+++ b/test/files/pos/rangepos.scala
@@ -0,0 +1,5 @@
+class Foo(val x: Double) extends AnyVal { }
+
+object Pretty {
+ def f(s1: String) = new { def bar = 5 }
+}
diff --git a/test/files/pos/t1050.scala b/test/files/pos/t1050.scala
index e017e30713..d34b0cff16 100644
--- a/test/files/pos/t1050.scala
+++ b/test/files/pos/t1050.scala
@@ -1,7 +1,7 @@
package t1050
abstract class A {
- type T <: scala.ScalaObject
+ type T <: scala.AnyRef
class A { this: T =>
def b = 3
def c = b
diff --git a/test/files/pos/t5545/S_1.scala b/test/files/pos/t5545/S_1.scala
new file mode 100644
index 0000000000..59ec1fd851
--- /dev/null
+++ b/test/files/pos/t5545/S_1.scala
@@ -0,0 +1,4 @@
+trait F[@specialized(Int) T1, R] {
+ def f(v1: T1): R
+ def g = v1 => f(v1)
+}
diff --git a/test/files/pos/t5545/S_2.scala b/test/files/pos/t5545/S_2.scala
new file mode 100644
index 0000000000..59ec1fd851
--- /dev/null
+++ b/test/files/pos/t5545/S_2.scala
@@ -0,0 +1,4 @@
+trait F[@specialized(Int) T1, R] {
+ def f(v1: T1): R
+ def g = v1 => f(v1)
+}
diff --git a/test/files/pos/t715/meredith_1.scala b/test/files/pos/t715/meredith_1.scala
index 3ed2e57d7a..8261b9881a 100644
--- a/test/files/pos/t715/meredith_1.scala
+++ b/test/files/pos/t715/meredith_1.scala
@@ -3,7 +3,7 @@ package com.sap.dspace.model.othello;
import scala.xml._
trait XMLRenderer {
- type T <: {def getClass() : java.lang.Class[_]}
+ type T <: Any {def getClass() : java.lang.Class[_]}
val valueTypes =
List(
classOf[java.lang.Boolean],
diff --git a/test/files/pos/trait-parents.scala b/test/files/pos/trait-parents.scala
new file mode 100644
index 0000000000..f6a2688751
--- /dev/null
+++ b/test/files/pos/trait-parents.scala
@@ -0,0 +1,16 @@
+trait Bip extends Any
+trait Foo extends Any
+trait Bar extends AnyRef
+trait Quux
+
+object Test {
+ def f(x: Bip) = 1
+ def g1(x: Foo with Bip) = f(x)
+
+ def main(args: Array[String]): Unit = {
+ f(new Bip with Foo { })
+ f(new Foo with Bip { })
+ g1(new Bip with Foo { })
+ g1(new Foo with Bip { })
+ }
+}