Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ksp returns empty constructor for data classes #279

Closed
yigit opened this issue Jan 30, 2021 · 0 comments · Fixed by #280
Closed

ksp returns empty constructor for data classes #279

yigit opened this issue Jan 30, 2021 · 0 comments · Fixed by #280

Comments

@yigit
Copy link
Collaborator

yigit commented Jan 30, 2021

sample input:

data class Subject(
    var x:Int
)

for some reason, this is returning only 1 constructor and it is synthetic.
this is happening on master, likely because of #275.
I'll try to repro in ksp

yigit added a commit to yigit/ksp that referenced this issue Jan 30, 2021
Unfortunately, it missed primary constructor, causing missing
constructors for that case.

This PR fixes that issue and also extends the test case to
cover it.

Fixes: google#279
yigit added a commit to yigit/ksp that referenced this issue Jan 30, 2021
in terms of how they return declarations (all includes contructor
now).
Unfortunately, it missed primary constructor, causing missing
constructors for that case.

This PR fixes that issue and also extends the test case to
cover it.

Fixes: google#279
yigit added a commit to yigit/ksp that referenced this issue Jan 30, 2021
PR google#275 made different class declaration backends more consistent
by adding constructor into declarations and making getConstructors
return based on that.
Unfortunately, it missed primary constructor, causing missing
constructors to be returned OR even worse, return an empty constructor
instead of the primary constructor.

This PR fixes that issue and also extends the test case to
cover it.

Fixes: google#279
neetopia pushed a commit that referenced this issue Feb 1, 2021
PR #275 made different class declaration backends more consistent
by adding constructor into declarations and making getConstructors
return based on that.
Unfortunately, it missed primary constructor, causing missing
constructors to be returned OR even worse, return an empty constructor
instead of the primary constructor.

This PR fixes that issue and also extends the test case to
cover it.

Fixes: #279
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant