summaryrefslogtreecommitdiff
path: root/test/files
diff options
context:
space:
mode:
Diffstat (limited to 'test/files')
-rw-r--r--test/files/run/t7876.scala26
1 files changed, 26 insertions, 0 deletions
diff --git a/test/files/run/t7876.scala b/test/files/run/t7876.scala
new file mode 100644
index 0000000000..aeec8c8cce
--- /dev/null
+++ b/test/files/run/t7876.scala
@@ -0,0 +1,26 @@
+import scala.tools.partest._
+
+// Type constructors for FunctionN and TupleN should not be considered as function type / tuple types.
+object Test extends DirectTest {
+ override def extraSettings: String = "-usejavacp"
+
+ def code = ""
+
+ def show() {
+ val global = newCompiler()
+ new global.Run()
+ import global._, definitions._
+ val function0TC = FunctionClass(0).typeConstructor
+ val tuple1TC = TupleClass(1).typeConstructor
+ FunctionClass.seq.foreach { sym =>
+ val tc = sym.typeConstructor
+ assert(!isFunctionType(tc), s"$tc")
+ assert(!isFunctionTypeDirect(tc), s"$tc (direct)")
+ }
+ TupleClass.seq.foreach { sym =>
+ val tc = sym.typeConstructor
+ assert(!isTupleType(tc), s"$sym")
+ assert(!isTupleTypeDirect(tc), s"$tc (direct)")
+ }
+ }
+}