diff options
author | Guillaume Martres <smarter@ubuntu.com> | 2015-04-04 01:15:30 +0200 |
---|---|---|
committer | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2015-05-01 13:27:42 +0200 |
commit | 06e1905aed315d5199936797c9e9493326b74595 (patch) | |
tree | db50094702d250935ecbafd465542d4c11adc5d5 /tests/pos/valueclasses/t6601/UsePrivateValueClass_2.scala | |
parent | 411d5be477cc862b14d8938c591524d8bf37d4cd (diff) | |
download | dotty-06e1905aed315d5199936797c9e9493326b74595.tar.gz dotty-06e1905aed315d5199936797c9e9493326b74595.tar.bz2 dotty-06e1905aed315d5199936797c9e9493326b74595.zip |
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.
Diffstat (limited to 'tests/pos/valueclasses/t6601/UsePrivateValueClass_2.scala')
-rw-r--r-- | tests/pos/valueclasses/t6601/UsePrivateValueClass_2.scala | 12 |
1 files changed, 12 insertions, 0 deletions
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 +} |