The following code crashes the ocamljs compiler:
it says:
Fatal error: exception Failure("bad method call")
while the following equivalent code compiles without crash:
let f o = let g = o#_get_x in g 1
It seems that the getter must not be applied directly to any argument, or ocamljs will die.
Although it is not fatal since there's workaround, it might be better if a more informative message is provided.
Similarly, the following code, which misses the setter's argument, will crash:
The error message is the same:
Fatal error: exception Failure("bad method call")
The following code crashes the ocamljs compiler:
it says:
while the following equivalent code compiles without crash:
It seems that the getter must not be applied directly to any argument, or ocamljs will die.
Although it is not fatal since there's workaround, it might be better if a more informative message is provided.
Similarly, the following code, which misses the setter's argument, will crash:
The error message is the same:
Fatal error: exception Failure("bad method call")