File: t6260a.scala

package info (click to toggle)
scala 2.11.12-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 62,924 kB
  • sloc: javascript: 28,808; java: 13,415; xml: 3,135; sh: 1,620; python: 756; makefile: 38; awk: 36; ansic: 6
file content (15 lines) | stat: -rw-r--r-- 789 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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 }
}