Weird compiler bug.
Monkey Forums/Monkey Bug Reports/Weird compiler bug.
| ||
To replicate. Write this in a file: file firstfile.monkey: Import secondfile Function Main() Local a:= new Another a.fieldnumber1 End Class MyClass Field x:Int = 34 Method Draw:String() End Private Field filednumber1:Int = 45 Method Kill:Int() End end And this: file secondfile.monkey Import firstfile Class Another extends MyClass Field fieldnumber1:Long Method See:Int() Print y End End When you create a public field that has the same name as a private field on a ancestor private area of a class, the program refuses to compile. The compiler outputs that the identifier can't be found. In my opinion, the only solution for this is to make this illegal as it is a hardly impossible to solve clash, but the error is not very well explained and gives something as weird as: Identifier 'fieldnumber1' not found - perhaps you meant 'fieldnumber1'? |
| ||
Forget it, the problem is that invoking a field is reporting weird bug messages. I hope this will be solved soon, as this can be something happening when converting properties to fields and vice-versa. |