aboutsummaryrefslogtreecommitdiff
path: root/tests/run/i2020.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2017-02-22 16:15:30 +0100
committerMartin Odersky <odersky@gmail.com>2017-02-22 16:15:40 +0100
commite3bad2efa3abf4884e07c6222f5d152e18c64b2d (patch)
treedc3bec5c6960cc91101be9c141da9639cf61af16 /tests/run/i2020.scala
parent8a826ee3d7a7a7230dea8cc1fa4f87b70e8efe81 (diff)
downloaddotty-e3bad2efa3abf4884e07c6222f5d152e18c64b2d.tar.gz
dotty-e3bad2efa3abf4884e07c6222f5d152e18c64b2d.tar.bz2
dotty-e3bad2efa3abf4884e07c6222f5d152e18c64b2d.zip
Fix #2020: Only the first parameters of a case class are caseaccessors
Only the parameters in the first parameter list of a case class should get the `CaseAccessor` flag. Fixes #2020.
Diffstat (limited to 'tests/run/i2020.scala')
-rw-r--r--tests/run/i2020.scala8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/run/i2020.scala b/tests/run/i2020.scala
new file mode 100644
index 000000000..78794a590
--- /dev/null
+++ b/tests/run/i2020.scala
@@ -0,0 +1,8 @@
+object Test {
+
+ case class Foo(x: Int)(y: Int)
+
+ def main(args: Array[String]) =
+ assert(Foo(1)(1) == Foo(1)(2))
+
+}