Allow overload
on extern methods on all targets
#9793
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This allows using
overload
methods which are markedextern
or live onextern
classes. The idea is that we want to allow this as long as we don't have to worry about generating the overloaded methods on targets that have no native support for it.Some notes:
extern
status@:overload
is not supported..disabled
test which checks the presence ofoverride
. We currently don't run any checks like that on externs at all, so this may or may not be something to look into.There are now only 4 checks for
pf_overload
left:@:overload
handlingadd_constructor
because it doesn't support overloadsWhile the first two should remain in place, we could at some point look into supporting overloaded constructors as well. This can first be done for true externs, and maybe even extended to extern inline constructors afterwards.
I'm sure there are some missing checks here, but we can add those when we come across them.