diff options
author | Martin Odersky <odersky@gmail.com> | 2015-04-21 11:40:48 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2015-04-22 17:19:34 +0200 |
commit | d72645211880225d13764cd2d0764eee0efb069e (patch) | |
tree | 4a288ef779bf9c2c43c99e451816a1160a188584 /tests/pos/t4062.scala | |
parent | dab8aa18419e7b6354d979440cae5105e2672061 (diff) | |
download | dotty-d72645211880225d13764cd2d0764eee0efb069e.tar.gz dotty-d72645211880225d13764cd2d0764eee0efb069e.tar.bz2 dotty-d72645211880225d13764cd2d0764eee0efb069e.zip |
Drop restriction that SuperAccessors should not touch patterns
Not sure why we need to do this, and in any case it's not sure
what constitutes a pattern. There are certainly some parts of
patterns (e.g. prefixes of unapplies, or their implicit arguments)
that should be transformed under SuperAccessors, so the previous
condition was too coarse.
We include the test case that motivated the restriction. It looks like
it works now.
Diffstat (limited to 'tests/pos/t4062.scala')
-rw-r--r-- | tests/pos/t4062.scala | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/pos/t4062.scala b/tests/pos/t4062.scala new file mode 100644 index 000000000..63e05b739 --- /dev/null +++ b/tests/pos/t4062.scala @@ -0,0 +1,7 @@ +class A(val f : String) + +class B(a : Option[String], f : String) extends A(f) { + a match { + case Some(`f`) => print(f) + } +} |