diff options
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Namers.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Namers.scala | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Namers.scala b/src/compiler/scala/tools/nsc/typechecker/Namers.scala index 1282cfb416..08837d9a54 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Namers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Namers.scala @@ -1084,6 +1084,9 @@ trait Namers extends MethodSynthesis { overriddenTp = overriddenTp.resultType } + // SI-7668 Substitute parameters from the parent method with those of the overriding method. + overriddenTp = overriddenTp.substSym(overridden.paramss.flatten, vparamss.flatten.map(_.symbol)) + overriddenTp match { case NullaryMethodType(rtpe) => overriddenTp = rtpe case MethodType(List(), rtpe) => overriddenTp = rtpe |