We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Following class definition:
class a hello: -> there: -> hello: -> 2
is compiled to following Javascript code without any exception thrown:
var a; a = (function(){ a.displayName = 'a'; var prototype = a.prototype, constructor = a; a.prototype.hello = function(){}; a.prototype.there = function(){}; a.prototype.hello = function(){ return 2; }; function a(){} return a; }());
...which doesn't prevent us erroneous re-definition of a method. I would expect a proper error, like duplicate property definition in an object:
a = hello: -> there: -> hello: -> 2 # => duplicate property "hello" on line 4
Would you consider adding such a guard in class definitions?
The text was updated successfully, but these errors were encountered:
That makes sense to me. I can't think of any reason why it should be one way for classes but another way for objects.
Sorry, something went wrong.
No branches or pull requests
Following class definition:
is compiled to following Javascript code without any exception thrown:
...which doesn't prevent us erroneous re-definition of a method. I would expect a proper error, like duplicate property definition in an object:
Would you consider adding such a guard in class definitions?
The text was updated successfully, but these errors were encountered: