From 4223bc2ddc497457c7dccd1b9b65e98244a9b4d1 Mon Sep 17 00:00:00 2001 From: Adriaan Moors Date: Tue, 18 Feb 2014 11:12:50 -0800 Subject: 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` --- test/files/pos/t7788.scala | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 test/files/pos/t7788.scala (limited to 'test') 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 -- cgit v1.2.3