FIR: Generate fake overrides always if there are type parameters

See the comment
This commit is contained in:
Denis Zharkov
2019-11-26 18:50:16 +03:00
parent 8efd59403d
commit 00a70c51f0
2 changed files with 5 additions and 2 deletions
@@ -153,7 +153,10 @@ class FirClassSubstitutionScope(
}
}
if (!wereChangesInTypeParameters) return Pair(member.typeParameters, substitutor)
// TODO: Uncomment when problem from org.jetbrains.kotlin.fir.Fir2IrTextTestGenerated.Declarations.Parameters.testDelegatedMembers is gone
// The problem is that Fir2Ir thinks that type parameters in fake override are the same as for original
// While common Ir contracts expect them to be different
// if (!wereChangesInTypeParameters) return Pair(member.typeParameters, substitutor)
return Pair(newTypeParameters, ChainedSubstitutor(substitutor, additionalSubstitutor))
}
@@ -31,5 +31,5 @@ FILE: importedReceiver.kt
this@R|/My|.R|/My.baz|()
(this@R|/My|, Boolean(true)).R|/My.gau|()
this@R|/Your|.R|/Your.wat|()
(this@R|/Your|, Boolean(false)).R|/Your.watwat|<R|kotlin/Boolean|>()
(this@R|/Your|, Boolean(false)).R|FakeOverride</Your.watwat: R|kotlin/Unit|>|<R|kotlin/Boolean|>()
}