summaryrefslogtreecommitdiff
path: root/test/files/pos
diff options
context:
space:
mode:
authorLukas Rytz <lukas.rytz@epfl.ch>2013-02-03 23:37:48 -0800
committerLukas Rytz <lukas.rytz@epfl.ch>2013-02-03 23:37:48 -0800
commit5aa225f3a57238ed90f8f60cf139043a23bd9f4f (patch)
treeb61731c335ca09f1ab23b057a4ec0c87b3275ee2 /test/files/pos
parent786a686b78e7bffb452c6508a83b69ad83849819 (diff)
parentf3cdf146709e0dd98533ee77e8ca2566380cb932 (diff)
downloadscala-5aa225f3a57238ed90f8f60cf139043a23bd9f4f.tar.gz
scala-5aa225f3a57238ed90f8f60cf139043a23bd9f4f.tar.bz2
scala-5aa225f3a57238ed90f8f60cf139043a23bd9f4f.zip
Merge pull request #2022 from lrytz/analyzerPlugins210
Analyzer Plugins
Diffstat (limited to 'test/files/pos')
-rw-r--r--test/files/pos/lubs.scala3
-rw-r--r--test/files/pos/presuperContext.scala13
-rw-r--r--test/files/pos/t1014.scala4
-rw-r--r--test/files/pos/t1803.flags1
-rw-r--r--test/files/pos/t1803.scala2
5 files changed, 22 insertions, 1 deletions
diff --git a/test/files/pos/lubs.scala b/test/files/pos/lubs.scala
new file mode 100644
index 0000000000..d7651f86b0
--- /dev/null
+++ b/test/files/pos/lubs.scala
@@ -0,0 +1,3 @@
+object Test {
+ List(new { def f = 1; def g = 1}, new { def f = 2}).map(_.f)
+}
diff --git a/test/files/pos/presuperContext.scala b/test/files/pos/presuperContext.scala
new file mode 100644
index 0000000000..cc34263073
--- /dev/null
+++ b/test/files/pos/presuperContext.scala
@@ -0,0 +1,13 @@
+class A {
+ class C extends { val x: A = this } with AnyRef
+}
+
+class B(x: Int)
+
+class D {
+ class C(x: Int) extends B({val test: D = this; x}) {
+ def this() {
+ this({val test: D = this; 1})
+ }
+ }
+}
diff --git a/test/files/pos/t1014.scala b/test/files/pos/t1014.scala
index 1ac87b225b..3fc10d10dc 100644
--- a/test/files/pos/t1014.scala
+++ b/test/files/pos/t1014.scala
@@ -1,6 +1,8 @@
import scala.xml.{NodeSeq, Elem}
-class EO extends App with Moo{
+class EO extends App with Moo {
+ // return type is Flog, inherited from overridden method.
+ // implicit conversions are applied because expected type `pt` is `Flog` when `computeType(rhs, pt)`.
def cat = <cat>dog</cat>
implicit def nodeSeqToFlog(in: Elem): Flog = new Flog(in)
diff --git a/test/files/pos/t1803.flags b/test/files/pos/t1803.flags
new file mode 100644
index 0000000000..d1a8244169
--- /dev/null
+++ b/test/files/pos/t1803.flags
@@ -0,0 +1 @@
+-Yinfer-argument-types \ No newline at end of file
diff --git a/test/files/pos/t1803.scala b/test/files/pos/t1803.scala
new file mode 100644
index 0000000000..42f4e784a3
--- /dev/null
+++ b/test/files/pos/t1803.scala
@@ -0,0 +1,2 @@
+class A { def foo[A](a: A) = a }
+class B extends A { override def foo[A](b) = b }