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 constructor regression in JS backend #10005

Closed
dom96 opened this issue Dec 15, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@dom96
Copy link
Member

commented Dec 15, 2018

import jsconsole
type
  Player* = ref object of RootObj
    id*: string
    nickname*: string
    color*: string

proc newPlayer*(nickname: string, color: string): Player =
  return Player(
      id: "foo",
      nickname: nickname,
      color: color,
  )

console.log(newPlayer("foo", "#1232").nickname)

Complains that newPlayer(...) is null on devel. This works with 0.19.0.

@Araq Araq closed this in 19f5835 Dec 16, 2018

Araq added a commit that referenced this issue Dec 16, 2018

nc-x added a commit to nc-x/Nim that referenced this issue Dec 16, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.