summaryrefslogtreecommitdiff
path: root/test/files/pos
diff options
context:
space:
mode:
authorJosh Suereth <joshua.suereth@gmail.com>2012-11-05 12:52:56 -0500
committerJosh Suereth <joshua.suereth@gmail.com>2012-11-05 12:52:56 -0500
commitaedc853040d7774bd39df43a51715f674f99471e (patch)
tree3d9fad1100c241b8663703898e46c030698eafe7 /test/files/pos
parent999918311b7bf764916431485cb11043f1c220ed (diff)
parent8b598436f64ca4e980c8a38f642085b4d23e2327 (diff)
downloadscala-aedc853040d7774bd39df43a51715f674f99471e.tar.gz
scala-aedc853040d7774bd39df43a51715f674f99471e.tar.bz2
scala-aedc853040d7774bd39df43a51715f674f99471e.zip
Merge branch '2.10.0-wip' into merge-2.10.0
Diffstat (limited to 'test/files/pos')
-rw-r--r--test/files/pos/t5031_3/Foo_1.scala5
-rw-r--r--test/files/pos/t5031_3/Main_2.scala6
-rw-r--r--test/files/pos/t5031_3/package.scala6
-rw-r--r--test/files/pos/t6556.scala32
-rw-r--r--test/files/pos/t6562.scala14
-rw-r--r--test/files/pos/t6600.scala8
6 files changed, 71 insertions, 0 deletions
diff --git a/test/files/pos/t5031_3/Foo_1.scala b/test/files/pos/t5031_3/Foo_1.scala
new file mode 100644
index 0000000000..5934a6ba79
--- /dev/null
+++ b/test/files/pos/t5031_3/Foo_1.scala
@@ -0,0 +1,5 @@
+package foo.bar
+
+object Foo {
+ def bar = 42
+}
diff --git a/test/files/pos/t5031_3/Main_2.scala b/test/files/pos/t5031_3/Main_2.scala
new file mode 100644
index 0000000000..2079460b83
--- /dev/null
+++ b/test/files/pos/t5031_3/Main_2.scala
@@ -0,0 +1,6 @@
+package org.example
+
+object Main extends App {
+ println(foo.bar.Foo.bar)
+}
+
diff --git a/test/files/pos/t5031_3/package.scala b/test/files/pos/t5031_3/package.scala
new file mode 100644
index 0000000000..23fede7d04
--- /dev/null
+++ b/test/files/pos/t5031_3/package.scala
@@ -0,0 +1,6 @@
+package foo
+
+package object bar {
+ type Foo = Int => String
+}
+
diff --git a/test/files/pos/t6556.scala b/test/files/pos/t6556.scala
new file mode 100644
index 0000000000..e1a6f49b86
--- /dev/null
+++ b/test/files/pos/t6556.scala
@@ -0,0 +1,32 @@
+package nl.ndervorst.commons.scalapimps
+
+trait Adapter[X] {self =>
+ type This = self.type
+ val adaptee: X
+ val adapt: This = self
+}
+
+object Adapter {
+ implicit def adaptee[Adaptee](adapter: Adapter[Adaptee]) = adapter.adaptee
+}
+
+
+
+object IterableW {
+ def zipMerge[E](it1: Iterable[E], it2: Iterable[E])(implicit o: Ordering[E]): Iterable[(Option[E], Option[E])] = null
+}
+
+
+class Series[X: Ordering, Y](val adaptee: Iterable[(X, Y)]) extends Adapter[Iterable[(X, Y)]] {
+ val order = implicitly[Ordering[X]]
+ def zipMerge(other: Series[X, Y]): Series[X, (Option[Y], Option[Y])] = IterableW.zipMerge(this, other)(new Ordering[(X, Y)] {
+ def compare(xy1: (X, Y), xy2: (X, Y)) = order.compare(xy1._1, xy2._1)
+ }).map {
+ case _ => null
+ }
+}
+
+
+object Series {
+ implicit def wrap[X: Ordering, Y](itble: Iterable[(X, Y)]): Series[X, Y] = new Series(itble)
+}
diff --git a/test/files/pos/t6562.scala b/test/files/pos/t6562.scala
new file mode 100644
index 0000000000..eec7aa5199
--- /dev/null
+++ b/test/files/pos/t6562.scala
@@ -0,0 +1,14 @@
+class Test {
+
+ @inline
+ def foo {
+ def it = new {}
+ (_: Any) => it
+ }
+
+ @inline
+ private def bar {
+ def it = new {}
+ (_: Any) => it
+ }
+}
diff --git a/test/files/pos/t6600.scala b/test/files/pos/t6600.scala
new file mode 100644
index 0000000000..1e8137894c
--- /dev/null
+++ b/test/files/pos/t6600.scala
@@ -0,0 +1,8 @@
+final class Natural extends scala.math.ScalaNumber with scala.math.ScalaNumericConversions {
+ def intValue(): Int = 0
+ def longValue(): Long = 0L
+ def floatValue(): Float = 0.0F
+ def doubleValue(): Double = 0.0D
+ def isWhole(): Boolean = false
+ def underlying() = this
+}