Skip to content

KSClassDeclaration.primaryConstructor might return a non-existing constructor #72

Closed

Description

For a class like this:

open class ExplicitConstructor {
    constructor(x:Int)
}

calling KSClassDeclaration.primaryConstructor returns a synthesized constructor with 0 arguments even though it should not exist as this class has only 1 constructor that receives a parameter.
Instead, it think it should be null.

Also, having a KSClassDeclaration.getAllConstructors() would be super handy.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions