Creating a valueOf() method results in a compilation error
- Dominant language
- ActionScript
- Stars
- 380
- Forks
- 120
- PR merge metrics
- No merged PRs in 30d
Description
Similarly to #367, if you create a method called valueOf(), the Royale compiler spits out an error.
Here's an example Main.as:
```
package {
public class Main {
public function Main () {
console.log("Hi Royale!");
}
public function valueOf():String {
return "Hello!";
}
}
}
```
If you compile with `asjsc -debug=true --targets=js src/Main.as`, the compiler reports this error:
```
src/Main.as(8): col: 19 Error: Overriding a function that is not marked for override
public function valueOf():String {
```
I can submit a PR to change this if you agree it should be changed. Thanks!
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.