blitz-foundation / monkey2

zlib License
3 stars 0 forks source link

Add warnings / Errors with Constructor and Virtual methods #50

Open Pharmhaus-2 opened 5 years ago

Pharmhaus-2 commented 5 years ago

Original Author: Ghouly-The-Ghost

For example, it should be illegal for a Class to invoke an Abstract method [in its constructor].

This was causing some strange linker errors that were not initially obvious. According to the StackOverflow link that Mark provided it is also dangerous for virtual functions, in general, because of the class hierarchy!

https://stackoverflow.com/questions/962132/calling-virtual-functions-inside-constructors