summaryrefslogtreecommitdiff
path: root/test/files/pos
diff options
context:
space:
mode:
authorLukas Rytz <lukas.rytz@gmail.com>2015-09-18 10:33:28 +0200
committerLukas Rytz <lukas.rytz@gmail.com>2015-09-18 10:33:28 +0200
commit133e7d053cc62ce0703d611e34fa750175cc3b48 (patch)
tree918e2dd3d8523f41ad8b1da4cf09b5580a13bd25 /test/files/pos
parent91cd6d1a3db422c576f15eceb0715c572ec44081 (diff)
parent76269ca7a63848aee1f141da75be8ca436bf9e6c (diff)
downloadscala-133e7d053cc62ce0703d611e34fa750175cc3b48.tar.gz
scala-133e7d053cc62ce0703d611e34fa750175cc3b48.tar.bz2
scala-133e7d053cc62ce0703d611e34fa750175cc3b48.zip
Merge remote-tracking branch 'upstream/2.12.x' into opt/heuristics
Diffstat (limited to 'test/files/pos')
-rw-r--r--test/files/pos/t2405.scala4
-rw-r--r--test/files/pos/t6666d.scala18
-rw-r--r--test/files/pos/t8002-nested-scope.scala2
-rw-r--r--test/files/pos/t9442.scala14
4 files changed, 35 insertions, 3 deletions
diff --git a/test/files/pos/t2405.scala b/test/files/pos/t2405.scala
index 224b2ce83b..0bc7a771b2 100644
--- a/test/files/pos/t2405.scala
+++ b/test/files/pos/t2405.scala
@@ -6,14 +6,14 @@ object Test1 {
implicitly[Int]
}
-// Testing for the absense of shadowing #1.
+// Testing for the absence of shadowing #1.
object Test2 {
import A.{x => y}
val x = 2
implicitly[Int]
}
-// Testing for the absense of shadowing #2.
+// Testing for the absence of shadowing #2.
object Test3 {
{
import A.{x => y}
diff --git a/test/files/pos/t6666d.scala b/test/files/pos/t6666d.scala
new file mode 100644
index 0000000000..49a688f91b
--- /dev/null
+++ b/test/files/pos/t6666d.scala
@@ -0,0 +1,18 @@
+
+import scala.collection.immutable.TreeMap
+import scala.math.Ordering
+
+class Test[K](param:TreeMap[K,Int]){
+ def this() = this({
+ implicit object TreeOrd extends Ordering[K](){
+ def compare(a: K, b: K) = {
+ -1
+ }
+ }
+ new TreeMap[K, Int]()
+ })
+}
+
+object Test extends App {
+ new Test()
+}
diff --git a/test/files/pos/t8002-nested-scope.scala b/test/files/pos/t8002-nested-scope.scala
index a2088bce7a..8ce809e556 100644
--- a/test/files/pos/t8002-nested-scope.scala
+++ b/test/files/pos/t8002-nested-scope.scala
@@ -1,5 +1,5 @@
// This test serves to capture the status quo, but should really
-// emit an accessibiltiy error.
+// emit an accessibility error.
// `Namers#companionSymbolOf` seems too lenient, and currently doesn't
// implement the same-scope checks mentioned:
diff --git a/test/files/pos/t9442.scala b/test/files/pos/t9442.scala
new file mode 100644
index 0000000000..2ea81e79cb
--- /dev/null
+++ b/test/files/pos/t9442.scala
@@ -0,0 +1,14 @@
+trait Ctx {
+ trait Tree
+}
+trait Lst[+A] {
+ def zip[A1 >: A, B](that: Lst[B]): Nothing
+}
+class C[@specialized(Int) T] {
+ def moo(t: T) = {
+ def foo1(c: Ctx)(l: Lst[c.Tree]) = l zip l
+ def foo2(c: Ctx)(l: Lst[c.Tree]*) = l(0) zip l(1)
+ def foo3(c: Ctx)(l: => Lst[c.Tree]) = l zip l
+ ???
+ }
+}