diff options
author | odersky <odersky@gmail.com> | 2015-07-15 15:53:56 +0200 |
---|---|---|
committer | odersky <odersky@gmail.com> | 2015-07-15 15:53:56 +0200 |
commit | 73354cdb374c15715a83cab381133ea267e25478 (patch) | |
tree | 06f6450612ae297c2e0fda2a75700889088171d2 /tests | |
parent | 6b246b29f2901e6aa2f3f80c83ba9dd41724391a (diff) | |
parent | 0efa171e8ccca0d49fc6d800fd21e29f7b7336fd (diff) | |
download | dotty-73354cdb374c15715a83cab381133ea267e25478.tar.gz dotty-73354cdb374c15715a83cab381133ea267e25478.tar.bz2 dotty-73354cdb374c15715a83cab381133ea267e25478.zip |
Merge pull request #721 from smarter/fix/implicit-scope-bounds
Don't add lower bounds of abstract types to the implicit scope
Diffstat (limited to 'tests')
-rw-r--r-- | tests/neg/implicit-lower-bound.scala | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/neg/implicit-lower-bound.scala b/tests/neg/implicit-lower-bound.scala new file mode 100644 index 000000000..4d5e6389c --- /dev/null +++ b/tests/neg/implicit-lower-bound.scala @@ -0,0 +1,14 @@ +class Foo + +class Bar extends Foo +object Bar { + implicit val listbar: List[Bar] = ??? +} + +class Test { + def get1(implicit lf: List[_ <: Bar]) = {} + def get2(implicit lf: List[_ >: Bar]) = {} + + get1 // works + get2 // error +} |