diff options
author | Lukas Rytz <lukas.rytz@epfl.ch> | 2013-02-04 11:32:14 +0100 |
---|---|---|
committer | Lukas Rytz <lukas.rytz@epfl.ch> | 2013-02-04 11:32:14 +0100 |
commit | df8de9063ce2008d2e23b46b6464abee03f75e5a (patch) | |
tree | f297cff880041ebd7ae7252ab4425f9095f2fcba /test/files/pos | |
parent | e67a039ec2e30d612019c8d3ffd644f7f74b00f6 (diff) | |
parent | f3cdf146709e0dd98533ee77e8ca2566380cb932 (diff) | |
download | scala-df8de9063ce2008d2e23b46b6464abee03f75e5a.tar.gz scala-df8de9063ce2008d2e23b46b6464abee03f75e5a.tar.bz2 scala-df8de9063ce2008d2e23b46b6464abee03f75e5a.zip |
Merge commit 'f3cdf146709e0dd98533ee77e8ca2566380cb932'
Conflicts:
src/compiler/scala/tools/nsc/typechecker/Contexts.scala
src/compiler/scala/tools/nsc/typechecker/Namers.scala
src/compiler/scala/tools/nsc/typechecker/Typers.scala
src/continuations/plugin/scala/tools/selectivecps/CPSAnnotationChecker.scala
src/reflect/scala/reflect/internal/AnnotationCheckers.scala
src/reflect/scala/reflect/internal/Symbols.scala
Diffstat (limited to 'test/files/pos')
-rw-r--r-- | test/files/pos/lubs.scala | 3 | ||||
-rw-r--r-- | test/files/pos/presuperContext.scala | 13 | ||||
-rw-r--r-- | test/files/pos/t1014.scala | 4 | ||||
-rw-r--r-- | test/files/pos/t1803.flags | 1 | ||||
-rw-r--r-- | test/files/pos/t1803.scala | 2 |
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 } |