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

object fields of distinct types doesn't work with JS #20227

Closed
ringabout opened this issue Aug 15, 2022 · 0 comments · Fixed by #20229
Closed

object fields of distinct types doesn't work with JS #20227

ringabout opened this issue Aug 15, 2022 · 0 comments · Fixed by #20229
Assignees

Comments

@ringabout
Copy link
Member

type
  Data = object
    id: int
  
  Test = distinct Data
  
  Object = object
    data: Test
  
var x: Object = Object(data: Test(Data(id: 12)))
echo x
Error: unhandled exception: types.nim(1691, 11) `ty.kind in {tyTuple, tyObject}`  [AssertionDefect]
@ringabout ringabout changed the title object fields of distinct types doesn't work iwth JS object fields of distinct types doesn't work with JS Aug 15, 2022
@ringabout ringabout self-assigned this Aug 15, 2022
Araq pushed a commit that referenced this issue Aug 24, 2022
capocasa pushed a commit to capocasa/Nim that referenced this issue Mar 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant