Jump to content
  • Advertisement
Sign in to follow this  

Bug in 2.161:derive class call wrong base method

This topic is 3495 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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();

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!