Translation error
Monkey Forums/Monkey Bug Reports/Translation error
| ||
| Hi, I have duplicate method name after translation this code
Import mojo
Class Game Extends App
Field f:Font
Method OnRender()
Draw()
f.Draw("",0,0)
f.Draw2("",0,0)
End
Method Draw()
End
End
Class Font
Method Draw(text:String, x:Int, y:Int)
End
Method Draw2(text:String, x:Int, y:Int)
End
End
Function Main:Int()
New Game
Return 0
End
This result on ios target
class bb_main_Font : public Object{
public:
bb_main_Font();
virtual int m_Draw2(String,int,int);
virtual int m_Draw2(String,int,int);
void mark();
};
|
| ||
| Monkey adds numbers after method names as a means to handle method overloading and overwriting in programming languages that don't support those. So the output isn't so much wrong as it is you just shouldn't use numbers at the end of method names. |
| ||
| Hi, That's a bug! Will fix. |
| ||
| This has been a bug the whole time? I just figured you were forcing better naming conventions in a way. @AntonM Nevermind my comment. |