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 d326f68 commit 41a716bCopy full SHA for 41a716b
compiler/src/dotty/tools/dotc/typer/Namer.scala
@@ -795,10 +795,16 @@ class Namer { typer: Typer =>
795
nestedCtx = localContext(sym).setNewScope
796
myTypeParams = {
797
implicit val ctx = nestedCtx
798
- val tparams = original.rhs match {
799
- case LambdaTypeTree(tparams, _) => tparams
+ def typeParamTrees(tdef: Tree): List[TypeDef] = tdef match {
+ case TypeDef(_, original) =>
800
+ original match {
801
+ case LambdaTypeTree(tparams, _) => tparams
802
+ case original: DerivedFromParamTree => typeParamTrees(original.watched)
803
+ case _ => Nil
804
+ }
805
case _ => Nil
806
}
807
+ val tparams = typeParamTrees(original)
808
completeParams(tparams)
809
tparams.map(symbolOfTree(_).asType)
810
0 commit comments