aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/implicit_tparam.scala
diff options
context:
space:
mode:
authorGuillaume Martres <smarter@ubuntu.com>2016-01-12 22:40:51 +0100
committerGuillaume Martres <smarter@ubuntu.com>2016-05-31 16:53:25 +0200
commit088902cb6d86a5546f3f3aaf317ba78a51c0c604 (patch)
tree4110ad8fd86dfb41d9cadc62068f53242860fbde /tests/pos/implicit_tparam.scala
parent818bf0b2aa3ec7544bb328aaad2b2bd75e724787 (diff)
downloaddotty-088902cb6d86a5546f3f3aaf317ba78a51c0c604.tar.gz
dotty-088902cb6d86a5546f3f3aaf317ba78a51c0c604.tar.bz2
dotty-088902cb6d86a5546f3f3aaf317ba78a51c0c604.zip
Do not miss implicits in type parameters of parents
This did not work before because we incorrectly looked for their value in the prefix of the type instead of the type itself.
Diffstat (limited to 'tests/pos/implicit_tparam.scala')
-rw-r--r--tests/pos/implicit_tparam.scala12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/pos/implicit_tparam.scala b/tests/pos/implicit_tparam.scala
new file mode 100644
index 000000000..3b7cf9113
--- /dev/null
+++ b/tests/pos/implicit_tparam.scala
@@ -0,0 +1,12 @@
+class Foo[T]
+class Bar extends Foo[A]
+
+class A
+object A {
+ implicit val bar: Bar = new Bar
+}
+
+object Test {
+ def getBar(implicit bar: Bar) = bar
+ getBar
+}