diff options
author | Martijn Hoekstra <Martijn Hoekstra> | 2016-09-03 12:10:53 +0200 |
---|---|---|
committer | Martijn Hoekstra <Martijn Hoekstra> | 2016-09-07 22:32:51 +0200 |
commit | 32819e2edc88dd06095704c04ed9c2dd0603386f (patch) | |
tree | 5ac33b7a4fc11fe5b13aeae26e963e5553e97fad /tests/pos/pos_valueclasses/t6260a.scala | |
parent | 6bce106fea7ce10eefc864a6e7c1351675065880 (diff) | |
download | dotty-32819e2edc88dd06095704c04ed9c2dd0603386f.tar.gz dotty-32819e2edc88dd06095704c04ed9c2dd0603386f.tar.bz2 dotty-32819e2edc88dd06095704c04ed9c2dd0603386f.zip |
honor -encoding compiler flag and defaults
rename test/pos/valueclasses to pos_valueclasses
tests/pos/valueclasses generates a valueclasses.flags
file in /tests/partest-generated/pos that conflicts
with the valueClasses.flags file that
tests/neg/valueClasses.scala tries to create
Diffstat (limited to 'tests/pos/pos_valueclasses/t6260a.scala')
-rw-r--r-- | tests/pos/pos_valueclasses/t6260a.scala | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/pos/pos_valueclasses/t6260a.scala b/tests/pos/pos_valueclasses/t6260a.scala new file mode 100644 index 000000000..e29f10452 --- /dev/null +++ b/tests/pos/pos_valueclasses/t6260a.scala @@ -0,0 +1,17 @@ +package t6260a + +final class Option[+A](val value: A) extends AnyVal + +// Was: sandbox/test.scala:21: error: bridge generated for member method f: ()Option[A] in class Bar +// which overrides method f: ()Option[A] in class Foo" +abstract class Foo[A] { def f(): Option[A] } + class Bar[A] extends Foo[A] { def f(): Option[A] = ??? } + +// User reported this as erroneous but I couldn't reproduce with 2.10.{0,1,2,3} +// https://issues.scala-lang.org/browse/SI-6260?focusedCommentId=64764&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-64764 +// I suspect he whittled down the example too far. +class Wrapper(val value: Int) extends AnyVal +abstract class Test { def check(the: Wrapper): Boolean } +object T { + new Test { def check(the: Wrapper) = true } +} |