aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2016-12-15 18:00:27 +0100
committerMartin Odersky <odersky@gmail.com>2016-12-15 18:00:27 +0100
commit403a16f70edfc95da4b575bbee05d3d7cbc90704 (patch)
tree2dd03fd70c6d8480de2f2b6608acfd267c30a254 /tests
parenta5620ab882b95ef60acf42814ac5568d5f93bdd4 (diff)
downloaddotty-403a16f70edfc95da4b575bbee05d3d7cbc90704.tar.gz
dotty-403a16f70edfc95da4b575bbee05d3d7cbc90704.tar.bz2
dotty-403a16f70edfc95da4b575bbee05d3d7cbc90704.zip
Fix #1797: Allow case class params with names _1, _2, ...
This was not possible before because it clashed with the automatically generated name of the accessor. We now allow it, by simply taking the parameter(accessor) itself as the case class accessor if it already has that name. But you still cannot write case class C(_2: Int, _1: String) nor should you be able to do this.
Diffstat (limited to 'tests')
-rw-r--r--tests/pos/i1797.scala1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/pos/i1797.scala b/tests/pos/i1797.scala
new file mode 100644
index 000000000..1f10082b7
--- /dev/null
+++ b/tests/pos/i1797.scala
@@ -0,0 +1 @@
+case class Tuple1[T](_1: T)