From 06e1905aed315d5199936797c9e9493326b74595 Mon Sep 17 00:00:00 2001 From: Guillaume Martres Date: Sat, 4 Apr 2015 01:15:30 +0200 Subject: Enable untried pos tests related to value classes Each test needs to have its own package because pos_all will try to compile the whole valueclasses directory at once. --- tests/pos/valueclasses/t6601/UsePrivateValueClass_2.scala | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 tests/pos/valueclasses/t6601/UsePrivateValueClass_2.scala (limited to 'tests/pos/valueclasses/t6601/UsePrivateValueClass_2.scala') diff --git a/tests/pos/valueclasses/t6601/UsePrivateValueClass_2.scala b/tests/pos/valueclasses/t6601/UsePrivateValueClass_2.scala new file mode 100644 index 000000000..acd0dbef9 --- /dev/null +++ b/tests/pos/valueclasses/t6601/UsePrivateValueClass_2.scala @@ -0,0 +1,12 @@ +package t6601 + +object Test { + // After the first attempt to make seprately compiled value + // classes respect the privacy of constructors, we got: + // + // exception when typing v.a().==(v.a())/class scala.reflect.internal.Trees$Apply + // constructor V in class V cannot be accessed in object Test in file test/files/pos/t6601/UsePrivateValueClass_2.scala + // scala.reflect.internal.Types$TypeError: constructor V in class V cannot be accessed in object Test + def foo(v: V) = v.a == v.a + def bar(v: V) = v == v +} -- cgit v1.2.3