prg-titech / Kanon

A live programming environment specialized for data structure programming.
https://prg-titech.github.io/Kanon/
MIT License
68 stars 4 forks source link

can't redefine non-configuratable property "__id" error in a use of this in a constructor #11

Closed masuhar closed 7 years ago

masuhar commented 7 years ago

An assignment of this in a constructor to another object will cause an error can't redefine non-configuratable property "__id" The following snippet is an example.

class Node {
    constructor(prev) {
        prev.a = this;
    }
}

new Node({a:null});

image

akiou commented 7 years ago

Thank you for your comment. I have fixed this issue. So please ask your confirmation.

masuhar commented 7 years ago

Thanks. It was fixed.

(因みにissueに書かれた問題を修正した場合は、commit messageの方に「fixes #11」のように書いておくと、commit記録がissueのコメントに書かれ、issueがcloseされます。issueはreopenできるので、修正できたと思った開発者は自分でcloseするのが一般的な流儀のようです。)