Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[K2] Synthetic property misses annotations from getter/setter #3688

@atyrin

Description

@atyrin

Create a Java class and annotate the setter method.

// JavaParent.java
import java.beans.BeanProperty;

public class JavaParent {
    private int context = 0;

    public int getContext() {
        return context;
    }

    @BeanProperty(required = true)
    public void setContext(int context) {
        this.context = context;
    }
}

Use it as a superclass in Kotlin.

class A : JavaParent()

The synthetic property context will miss the annotation in Dokka.

K1:
image


K2
image

Metadata

Metadata

Assignees

Labels

bugtopic: K2Issues / PRs that are related to the K2 migration. See #2888

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions