Bug in 2.161:derive class call wrong base method

Started by
2 comments, last by huangyous 14 years, 11 months ago
there are 4 classes,When C3 calls "Fun()",I think it should call C2::Fun,but it prints "C1:Fun" in this case; When I comment the "void dumy(){}" line,it prints "C2::Fun",So I think maybe its a bug. class C0 { void dumy(){}//comment this line to make the "Fun()" call right }; class C1:C0 { void Fun() { print("C1:Fun"); } }; class C2:C1 { void Fun() { print("C2:Fun"); } }; class C3:C2 { void call(){Fun();} }; C3 c3();c3.call();
Advertisement
Thanks for the report. I've reproduced the bug, and will hopefully have a fix for it soon.

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

I've checked in the fix for this bug now. You can get it with revision 411.

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

Thanks,the bug is fixed!

This topic is closed to new replies.

Advertisement