summaryrefslogtreecommitdiff
path: root/test/files/scalacheck
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/scalacheck')
-rw-r--r--test/files/scalacheck/quasiquotes/TermDeconstructionProps.scala24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/files/scalacheck/quasiquotes/TermDeconstructionProps.scala b/test/files/scalacheck/quasiquotes/TermDeconstructionProps.scala
index 9e60729c09..49ffaff630 100644
--- a/test/files/scalacheck/quasiquotes/TermDeconstructionProps.scala
+++ b/test/files/scalacheck/quasiquotes/TermDeconstructionProps.scala
@@ -222,4 +222,28 @@ object TermDeconstructionProps extends QuasiquoteProperties("term deconstruction
val q"{ case ..$cases }" = q"{ case a => b case c => d }"
val List(cq"a => b", cq"c => d") = cases
}
+
+ property("SI-8350 `new C` and `new C()` are equivalent") = test {
+ val q"new C" = q"new C()"
+ val q"new C()" = q"new C"
+ }
+
+ property("SI-8350 new applications extracted only for non-empty ctor calls") = test{
+ val q"new $c1" = q"new C()"
+ assert(c1 ≈ tq"C")
+ val q"new $c2" = q"new C(x)"
+ assert(c2 ≈ q"${tq"C"}(x)")
+ }
+
+ property("SI-8350 original test case") = test {
+ val q"new ..$parents" = q"new Foo with Bar"
+ assert(parents ≈ List(tq"Foo", tq"Bar"))
+ }
+
+ property("SI-8387 new is not an application") = test {
+ val `new` = q"new F(x)"
+ val q"$f(...$argss)" = `new`
+ assert(f ≈ `new`)
+ assert(argss.isEmpty)
+ }
}