-
Notifications
You must be signed in to change notification settings - Fork 516
Closed
Milestone
Description
Expected Behavior
I should be able to reference, use, and construct RuleId
s from Java code.
Observed Behavior
I cannot access the third property of LintError
(a RuleId
). The generated bytecode shows that the name is mangled, per the docs:
// access flags 0x11
public final getRuleId-6XN97os()Ljava/lang/String;
@Lorg/jetbrains/annotations/NotNull;() // invisible
L0
LINENUMBER 17 L0
ALOAD 0
GETFIELD com/pinterest/ktlint/rule/engine/api/LintError.ruleId : Ljava/lang/String;
ARETURN
L1
LOCALVARIABLE this Lcom/pinterest/ktlint/rule/engine/api/LintError; L0 L1 0
MAXSTACK = 1
MAXLOCALS = 1
This can be fixed by explicitly specifying the name with @JvmName
.
Your Environment
- Version of ktlint used:
0.49.1
Metadata
Metadata
Assignees
Labels
No labels