[JVM IR] KT-36985: $default respects @Deprecated

$default dispatch methods gains @Deprecated if the original function
with default arguments has it.
This commit is contained in:
Kristoffer Andersen
2020-06-23 14:25:01 +02:00
committed by Dmitry Petrov
parent 034623f82a
commit b95d3e711e
2 changed files with 1 additions and 2 deletions
@@ -134,7 +134,7 @@ class FunctionCodegen(
private fun IrFunction.calculateMethodFlags(): Int {
if (origin == IrDeclarationOrigin.FUNCTION_FOR_DEFAULT_PARAMETER) {
return getVisibilityForDefaultArgumentStub() or Opcodes.ACC_SYNTHETIC.let {
return getVisibilityForDefaultArgumentStub() or Opcodes.ACC_SYNTHETIC or deprecationFlags.let {
if (this is IrConstructor) it else it or Opcodes.ACC_STATIC
}
}
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JVM_IR
// WITH_RUNTIME
class Foo {