From 593112ed56b46da182c7b216264f921c5780ae24 Mon Sep 17 00:00:00 2001 From: Simon Ochsenreither Date: Fri, 13 Apr 2012 18:29:18 +0200 Subject: Adds test and check files for SI-5666. Covers common non-newable types. --- test/files/neg/t5666.check | 37 +++++++++++++++++++++++++++++++++++++ test/files/neg/t5666.scala | 14 ++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 test/files/neg/t5666.check create mode 100644 test/files/neg/t5666.scala (limited to 'test') diff --git a/test/files/neg/t5666.check b/test/files/neg/t5666.check new file mode 100644 index 0000000000..1be51d0138 --- /dev/null +++ b/test/files/neg/t5666.check @@ -0,0 +1,37 @@ +t5666.scala:2: error: class Any is abstract; cannot be instantiated + new Any + ^ +t5666.scala:3: error: trait AnyVal is abstract; cannot be instantiated + new AnyVal + ^ +t5666.scala:4: error: Double does not have a constructor + new Double + ^ +t5666.scala:5: error: Float does not have a constructor + new Float + ^ +t5666.scala:6: error: Long does not have a constructor + new Long + ^ +t5666.scala:7: error: Int does not have a constructor + new Int + ^ +t5666.scala:8: error: Char does not have a constructor + new Char + ^ +t5666.scala:9: error: Short does not have a constructor + new Short + ^ +t5666.scala:10: error: Byte does not have a constructor + new Byte + ^ +t5666.scala:11: error: Boolean does not have a constructor + new Boolean + ^ +t5666.scala:12: error: Unit does not have a constructor + new Unit + ^ +t5666.scala:13: error: trait Nothing is abstract; cannot be instantiated + new Nothing + ^ +12 errors found diff --git a/test/files/neg/t5666.scala b/test/files/neg/t5666.scala new file mode 100644 index 0000000000..ffaeaacdaf --- /dev/null +++ b/test/files/neg/t5666.scala @@ -0,0 +1,14 @@ +object t5666 { + new Any + new AnyVal + new Double + new Float + new Long + new Int + new Char + new Short + new Byte + new Boolean + new Unit + new Nothing +} \ No newline at end of file -- cgit v1.2.3