summaryrefslogtreecommitdiff
path: root/test/files
diff options
context:
space:
mode:
Diffstat (limited to 'test/files')
-rw-r--r--test/files/pos/bcode_throw_null/TN.scala7
-rw-r--r--test/files/pos/overzealous-assert-genbcode.scala10
-rw-r--r--test/files/run/t6200.scala6
-rw-r--r--test/files/scalacheck/quasiquotes/TermConstructionProps.scala5
4 files changed, 25 insertions, 3 deletions
diff --git a/test/files/pos/bcode_throw_null/TN.scala b/test/files/pos/bcode_throw_null/TN.scala
new file mode 100644
index 0000000000..ed38b59bae
--- /dev/null
+++ b/test/files/pos/bcode_throw_null/TN.scala
@@ -0,0 +1,7 @@
+object TN {
+
+ def pre1(b: Boolean) {
+ println(if (b) 1 else throw null)
+ }
+
+}
diff --git a/test/files/pos/overzealous-assert-genbcode.scala b/test/files/pos/overzealous-assert-genbcode.scala
new file mode 100644
index 0000000000..ddd70b0c44
--- /dev/null
+++ b/test/files/pos/overzealous-assert-genbcode.scala
@@ -0,0 +1,10 @@
+object Test {
+
+ def main(args: Array[String]) {
+ args(0) match {
+ case a: String => while(a == null) {}
+ }
+ }
+
+}
+
diff --git a/test/files/run/t6200.scala b/test/files/run/t6200.scala
index 02659c26bc..9a5d91e042 100644
--- a/test/files/run/t6200.scala
+++ b/test/files/run/t6200.scala
@@ -10,7 +10,7 @@ object Test extends App {
def testCorrectness[T: Ordering](n: Int, mkKey: Int => T) {
val o = implicitly[Ordering[T]]
- val s = HashMap.empty[T, Unit] ++ (0 until n).map(x => mkKey(x) ->())
+ val s = HashMap.empty[T, Unit] ++ (0 until n).map(x => mkKey(x) -> (()))
for (i <- 0 until n) {
val ki = mkKey(i)
val a = s.filter(kv => o.lt(kv._1, ki))
@@ -24,7 +24,7 @@ object Test extends App {
// I could not come up with a simple test that tests structural sharing when only parts are reused, but
// at least this fails with the old and passes with the new implementation
def testSharing() {
- val s = HashMap.empty[Int, Unit] ++ (0 until 100).map(_ ->())
+ val s = HashMap.empty[Int, Unit] ++ (0 until 100).map(_ -> (()))
require(s.filter(_ => true) eq s)
require(s.filterNot(_ => false) eq s)
}
@@ -50,7 +50,7 @@ object Test extends App {
}
}
- val s = HashMap.empty[HashCounter, Unit] ++ (0 until 100).map(k => HashCounter(k) ->())
+ val s = HashMap.empty[HashCounter, Unit] ++ (0 until 100).map(k => HashCounter(k) -> (()))
val hashCount0 = hashCount
val equalsCount0 = equalsCount
val t = s.filter(_._1 < HashCounter(50))
diff --git a/test/files/scalacheck/quasiquotes/TermConstructionProps.scala b/test/files/scalacheck/quasiquotes/TermConstructionProps.scala
index 6fb05ff9a4..38fbfa9f7f 100644
--- a/test/files/scalacheck/quasiquotes/TermConstructionProps.scala
+++ b/test/files/scalacheck/quasiquotes/TermConstructionProps.scala
@@ -224,4 +224,9 @@ object TermConstructionProps extends QuasiquoteProperties("term construction") {
property("SI-8009") = test {
q"`foo`".asInstanceOf[reflect.internal.SymbolTable#Ident].isBackquoted
}
+
+ property("SI-8148") = test {
+ val q"($a, $b) => $_" = q"_ + _"
+ assert(a.name != b.name)
+ }
}