diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2013-09-11 23:29:56 +0200 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2013-09-11 23:29:56 +0200 |
commit | c3042e1ddbc53e11bb874a7aa57e417c980c93f6 (patch) | |
tree | 6dfd083da1796320d48698b50d4915126721eada /test/files/scalacheck/quasiquotes/TypeConstructionProps.scala | |
parent | 13c716eb45a09faf8853ea13207a48dbe8b59a19 (diff) | |
parent | 9788e7a1f1809491154c2bcb47d3061b11c1d8a8 (diff) | |
download | scala-c3042e1ddbc53e11bb874a7aa57e417c980c93f6.tar.gz scala-c3042e1ddbc53e11bb874a7aa57e417c980c93f6.tar.bz2 scala-c3042e1ddbc53e11bb874a7aa57e417c980c93f6.zip |
Merge remote-tracking branch 'origin/master' into merge/2.10.x-to-master
Conflicts:
src/compiler/scala/tools/nsc/ast/parser/Parsers.scala
Diffstat (limited to 'test/files/scalacheck/quasiquotes/TypeConstructionProps.scala')
-rw-r--r-- | test/files/scalacheck/quasiquotes/TypeConstructionProps.scala | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/files/scalacheck/quasiquotes/TypeConstructionProps.scala b/test/files/scalacheck/quasiquotes/TypeConstructionProps.scala index 535ed8ecbf..cac83ff8ac 100644 --- a/test/files/scalacheck/quasiquotes/TypeConstructionProps.scala +++ b/test/files/scalacheck/quasiquotes/TypeConstructionProps.scala @@ -22,4 +22,15 @@ object TypeConstructionProps extends QuasiquoteProperties("type construction") assert(tq"(..$ts)" ≈ tq"Tuple2[t1, t2]") assert(tq"(t0, ..$ts)" ≈ tq"Tuple3[t0, t1, t2]") } + + property("refined type") = test { + val stats = q"def foo" :: q"val x: Int" :: q"type Y = String" :: Nil + assert(tq"T { ..$stats }" ≈ tq"T { def foo; val x: Int; type Y = String }") + } + + property("function type") = test { + val argtpes = tq"A" :: tq"B" :: Nil + val restpe = tq"C" + assert(tq"..$argtpes => $restpe" ≈ tq"(A, B) => C") + } }
\ No newline at end of file |