Skip to content

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

Closed
@yigit

Description

@yigit

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.

Metadata

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