summaryrefslogtreecommitdiff
path: root/test/pending/pos
diff options
context:
space:
mode:
Diffstat (limited to 'test/pending/pos')
-rw-r--r--test/pending/pos/t1832.scala10
-rw-r--r--test/pending/pos/t3439.scala2
-rw-r--r--test/pending/pos/t5091.scala11
-rw-r--r--test/pending/pos/t5231.scala18
-rw-r--r--test/pending/pos/t5265.scala21
5 files changed, 62 insertions, 0 deletions
diff --git a/test/pending/pos/t1832.scala b/test/pending/pos/t1832.scala
new file mode 100644
index 0000000000..bca863f4bd
--- /dev/null
+++ b/test/pending/pos/t1832.scala
@@ -0,0 +1,10 @@
+// Edit by paulp: reduced.
+trait Cloning {
+ trait Foo
+ def fn(g: Int => Unit): Foo
+
+ implicit def mkStar(i: Int) = new { def *(a: Foo): Foo = null }
+
+ val pool1 = 4 * fn { case i => i * 2 }
+ val pool2 = 4 * fn { case i: Int => i * 2 }
+}
diff --git a/test/pending/pos/t3439.scala b/test/pending/pos/t3439.scala
new file mode 100644
index 0000000000..425f1aeeb5
--- /dev/null
+++ b/test/pending/pos/t3439.scala
@@ -0,0 +1,2 @@
+abstract class ParametricMessage[M: Manifest](msg: M) { def message = msg }
+case class ParametricMessage1[M: Manifest](msg: M, p1: Class[_]) extends ParametricMessage(msg)
diff --git a/test/pending/pos/t5091.scala b/test/pending/pos/t5091.scala
new file mode 100644
index 0000000000..217e83f66d
--- /dev/null
+++ b/test/pending/pos/t5091.scala
@@ -0,0 +1,11 @@
+object RecursiveValueNeedsType {
+
+ def foo(param: String) = 42
+ def bar(n: Int) = 42
+
+ {
+ val xxx = foo(param = null)
+ val param = bar(xxx)
+ }
+
+}
diff --git a/test/pending/pos/t5231.scala b/test/pending/pos/t5231.scala
new file mode 100644
index 0000000000..77e6631ebb
--- /dev/null
+++ b/test/pending/pos/t5231.scala
@@ -0,0 +1,18 @@
+object Client {
+ sealed trait ConfigLike {
+ def clientID: Int
+ }
+
+ object Config {
+ def apply() : ConfigBuilder = new ConfigBuilder()
+ implicit def build( cb: ConfigBuilder ) : Config = cb.build
+ }
+
+ final class Config private[Client]( val clientID: Int )
+ extends ConfigLike
+
+ final class ConfigBuilder private () extends ConfigLike {
+ var clientID: Int = 0
+ def build : Config = new Config( clientID )
+ }
+}
diff --git a/test/pending/pos/t5265.scala b/test/pending/pos/t5265.scala
new file mode 100644
index 0000000000..3be7d2187e
--- /dev/null
+++ b/test/pending/pos/t5265.scala
@@ -0,0 +1,21 @@
+import java.util.Date
+
+trait TDate
+
+trait TT[A1,T1]
+
+trait TTFactory[F,G] {
+ def create(f: F) : TT[F,G]
+ def sample: F
+}
+
+object Impls {
+
+ // If the c1 is declared before c2, it compiles fine
+ implicit def c2(s: Date) = c1.create(s)
+
+ implicit val c1 = new TTFactory[Date,TDate] {
+ def create(v: Date): TT[Date,TDate] = sys.error("")
+ def sample = new Date
+ }
+} \ No newline at end of file