summaryrefslogtreecommitdiff
path: root/modules/jsonrpc
diff options
context:
space:
mode:
authorGeorge Marques <george@gmarqu.es>2022-03-06 11:09:12 -0300
committerGeorge Marques <george@gmarqu.es>2022-03-06 11:16:20 -0300
commit1ebcb58e6942582b3c1e4af9de44f5ce21245148 (patch)
treeac136bd5a11e137af52a4f55aeb79ba43f044f79 /modules/jsonrpc
parent272b35595474e02b640dcd51201bc07424d43bae (diff)
GDScript: Check if method signature matches the parent
To guarantee polymorphism, a method signature must be compatible with the parent. This checks if: 1. Return type is the same. 2. The subclass method takes at least the same amount of parameters. 3. The matching parameters have the same type. 4. If the subclass takes more parameters, all of the extra ones have a default value. 5. If the superclass has default values, so must have the subclass. There's a few test cases to ensure this holds up.
Diffstat (limited to 'modules/jsonrpc')
0 files changed, 0 insertions, 0 deletions