diff options
author | Paul Phillips <paulp@improving.org> | 2013-03-13 05:13:16 -0700 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2013-03-13 05:13:16 -0700 |
commit | 184e0cc126c9499ea7572621663b14c37dba4734 (patch) | |
tree | 43832424e3150a4e34b0e5e37fccc4e76c80d4d9 /test/files/neg | |
parent | ac51ccdea40dc39fe1ae278e9b9b45d1e7679baf (diff) | |
parent | 5f324591a4c4af53f27a64932b843ba1423c37cd (diff) | |
download | scala-184e0cc126c9499ea7572621663b14c37dba4734.tar.gz scala-184e0cc126c9499ea7572621663b14c37dba4734.tar.bz2 scala-184e0cc126c9499ea7572621663b14c37dba4734.zip |
Merge pull request #2242 from adriaanm/merge-2.10.x
Merge 2.10.x into master
Diffstat (limited to 'test/files/neg')
-rw-r--r-- | test/files/neg/t7235.check | 4 | ||||
-rw-r--r-- | test/files/neg/t7235.scala | 14 | ||||
-rw-r--r-- | test/files/neg/t7238.check | 6 | ||||
-rw-r--r-- | test/files/neg/t7238.scala | 7 |
4 files changed, 31 insertions, 0 deletions
diff --git a/test/files/neg/t7235.check b/test/files/neg/t7235.check new file mode 100644 index 0000000000..357a3dfd83 --- /dev/null +++ b/test/files/neg/t7235.check @@ -0,0 +1,4 @@ +t7235.scala:9: error: implementation restriction: cannot reify refinement type trees with non-empty bodies + val Block(List(ValDef(_, _, tpt: CompoundTypeTree, _)), _) = reify{ val x: C { def x: Int } = ??? }.tree + ^ +one error found diff --git a/test/files/neg/t7235.scala b/test/files/neg/t7235.scala new file mode 100644 index 0000000000..cfebad3fae --- /dev/null +++ b/test/files/neg/t7235.scala @@ -0,0 +1,14 @@ +import scala.reflect.runtime.universe._ +import scala.reflect.runtime.{universe => ru} +import scala.reflect.runtime.{currentMirror => cm} +import scala.tools.reflect.ToolBox + +class C + +object Test extends App { + val Block(List(ValDef(_, _, tpt: CompoundTypeTree, _)), _) = reify{ val x: C { def x: Int } = ??? }.tree + println(tpt) + println(tpt.templ.parents) + println(tpt.templ.self) + println(tpt.templ.body) +} diff --git a/test/files/neg/t7238.check b/test/files/neg/t7238.check new file mode 100644 index 0000000000..b87f83ff65 --- /dev/null +++ b/test/files/neg/t7238.check @@ -0,0 +1,6 @@ +t7238.scala:6: error: type mismatch; + found : Seq[Any] + required: Seq[String] + c.c()(Seq[Any](): _*) + ^ +one error found diff --git a/test/files/neg/t7238.scala b/test/files/neg/t7238.scala new file mode 100644 index 0000000000..d42dc8d385 --- /dev/null +++ b/test/files/neg/t7238.scala @@ -0,0 +1,7 @@ +trait Main { + trait C { + def c(x: Any = 0)(bs: String*) + } + def c: C + c.c()(Seq[Any](): _*) +} |