When register a Abstract Class using GDREGISTER_CLASS(), compiled without error #1425
Labels
discussion
enhancement
This is an enhancement on the current functionality
topic:buildsystem
Related to the buildsystem or CI setup
Godot version
4.3.dev(29b3d9e)
godot-cpp version
4.3.dev(a62f633)
System information
windows 11
Issue description
Created an Abstract class that inherits from Node. When I registered this class using GDREGISTER_CLASS() in register_types.cpp and compiled the project, the C++ did not report any errors.
Open the engine, and selecte this class to create a root node, it will print error:
![QQ截图20240329171501](https://private-user-images.githubusercontent.com/63843124/318007932-53bfbc35-80ec-4943-a769-ae5cd34ca84a.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk4MjM2NDEsIm5iZiI6MTczOTgyMzM0MSwicGF0aCI6Ii82Mzg0MzEyNC8zMTgwMDc5MzItNTNiZmJjMzUtODBlYy00OTQzLWE3NjktYWU1Y2QzNGNhODRhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE3VDIwMTU0MVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTY0OWE5MWU3MmQ4MTQxY2EwODIyZWZjM2I4ZTE3YzdmZjVjYzVlNGJjNzEwZDA1Mjg2N2VkOWY1ZDQwODI0NzUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.rscSVGawfhRoOR7prUtvmPfV1v3s9i068W2zXIigrVA)
The expected result is that when I register an abstract class with GDREGISTER_CLASS(), the project cannot be compiled.
I analyzed and it seems that the following code caused the class constructor to be skipped during compilation:
Steps to reproduce
compile the project, will successed.
open the engine and create this class with error
Minimal reproduction project
N/A
The text was updated successfully, but these errors were encountered: