diff options
author | Adriaan Moors <adriaan.moors@typesafe.com> | 2014-02-18 11:12:50 -0800 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@typesafe.com> | 2014-02-18 16:41:00 -0800 |
commit | 4223bc2ddc497457c7dccd1b9b65e98244a9b4d1 (patch) | |
tree | 913115fd5918fb372a5fae8228820b59c7fe2350 /test/files | |
parent | bba01661ea629ff636a538226ad267a67d9dbfa7 (diff) | |
download | scala-4223bc2ddc497457c7dccd1b9b65e98244a9b4d1.tar.gz scala-4223bc2ddc497457c7dccd1b9b65e98244a9b4d1.tar.bz2 scala-4223bc2ddc497457c7dccd1b9b65e98244a9b4d1.zip |
SI-7788 Avoid accidental shadowing of Predef.conforms
Rename `conforms` to `$conforms` and put in a minimal backstop: pos/t7788.scala
TODO: predicate the backwards compatibility shim for `Predef_conforms`
on `-Xsource:2.10`
Diffstat (limited to 'test/files')
-rw-r--r-- | test/files/pos/t7788.scala | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/files/pos/t7788.scala b/test/files/pos/t7788.scala new file mode 100644 index 0000000000..81eada962b --- /dev/null +++ b/test/files/pos/t7788.scala @@ -0,0 +1,8 @@ +class Test { + // Predef used to define a method `conforms` to produce the implicit evidence below + // all this does is ensure we don't rename Predef.$conforms back to conforms when $ goes out of fashion + // or that there is some other way of generating the implicit value that witnesses T => U for T <: U + def conforms(x: Int, y: Int) = x < y + def foo[A](implicit ev: Int => A) = ??? + foo[Int] +}
\ No newline at end of file |