summaryrefslogtreecommitdiff
path: root/test/debug
diff options
context:
space:
mode:
authorBrian McKenna <brian@simpleenergy.com>2014-09-07 12:33:52 -0600
committerBrian McKenna <brian@brianmckenna.org>2015-08-11 17:13:34 +1000
commit5bd8ea0edffe7b725e5fa665a82a5795d5dafe8f (patch)
tree1b41ee5ffa3a1be3fa7881d0fa9cd2665962260b /test/debug
parent462e22d2f25bb9432c5a1e7bf20f391e6424f7a9 (diff)
downloadscala-5bd8ea0edffe7b725e5fa665a82a5795d5dafe8f.tar.gz
scala-5bd8ea0edffe7b725e5fa665a82a5795d5dafe8f.tar.bz2
scala-5bd8ea0edffe7b725e5fa665a82a5795d5dafe8f.zip
SI-6806 Add an @implicitAmbiguous annotation
Example usage: trait =!=[C, D] implicit def neq[E, F] : E =!= F = null @annotation.implicitAmbiguous("Could not prove ${J} =!= ${J}") implicit def neqAmbig1[G, H, J] : J =!= J = null implicit def neqAmbig2[I] : I =!= I = null implicitly[Int =!= Int] Which gives the following error: implicit-ambiguous.scala:9: error: Could not prove Int =!= Int implicitly[Int =!= Int] ^ Better than what was previously given: implicit-ambiguous.scala:9: error: ambiguous implicit values: both method neqAmbig1 in object Test of type [G, H, J]=> Main.$anon.Test.=!=[J,J] and method neqAmbig2 in object Test of type [I]=> Main.$anon.Test.=!=[I,I] match expected type Main.$anon.Test.=!=[Int,Int] implicitly[Int =!= Int] ^
Diffstat (limited to 'test/debug')
0 files changed, 0 insertions, 0 deletions