We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d2b916b commit 416b3ebCopy full SHA for 416b3eb
src/dotty/tools/dotc/typer/Implicits.scala
@@ -323,7 +323,7 @@ trait ImplicitRunInfo { self: RunInfo =>
323
def addParentScope(parent: TypeRef): Unit = {
324
iscopeRefs(parent) foreach addRef
325
for (param <- parent.typeParams)
326
- comps ++= iscopeRefs(pre.member(param.name).info)
+ comps ++= iscopeRefs(tp.member(param.name).info)
327
}
328
val companion = cls.companionModule
329
if (companion.exists) addRef(companion.valRef)
tests/pos/implicit_tparam.scala
@@ -0,0 +1,12 @@
1
+class Foo[T]
2
+class Bar extends Foo[A]
3
+
4
+class A
5
+object A {
6
+ implicit val bar: Bar = new Bar
7
+}
8
9
+object Test {
10
+ def getBar(implicit bar: Bar) = bar
11
+ getBar
12
0 commit comments