[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:
committed by
Dmitry Petrov
parent
034623f82a
commit
b95d3e711e
+1
-1
@@ -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
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// WITH_RUNTIME
|
||||
|
||||
class Foo {
|
||||
|
||||
Reference in New Issue
Block a user