Implement interface support - #473
Conversation
3b48583 to
d393747
Compare
3b48583 to
00722a8
Compare
ahmed7p
left a comment
There was a problem hiding this comment.
When interfaces extending normal interfaces the game crashes with the lime null object window with weird bug in the terminal with out crashlog and extending ScriptedInterfaces closes the game with out any error at all like the game just close no errors no log nothing it just close + implementing does nothing it's like doesn't do anything i used it i tried to get any of the errors of not having the funtion nothing shows i tried implementing Scripted and Source ones all the same so that's what i have
i don't see any other reviews (til didn't test it) so idk if it's only me
some screen shots
|
The errors should be fixed now, appreciate you reporting them. As for the last image of it not giving any errors, this is intentional in a sense. The interfaces start to give you errors only when trying to instantiate the class as that's when it tries to validate the interfaces. I was considering having it so it would give the errors nonetheless, but I felt that would be too much of a hassle trying to do though and most script class errors that happen in Polymod that are normally syntax errors in Haxe are thrown at runtime anyways. Not to mention the regular use case for interfaces are meant for class instances so nonetheless you are going to get the validation errors regardless lol. Though, if someone else on the crew would rather want to request for that change I wouldn't mind trying to attempt it. |
|
Pushed a final fix relating to validating interfaces since i accidentally fucked it up but the PR should be fully good now! |
2b5eb65 to
31fef02
Compare
d8b3dbf to
6a15058
Compare
|
This PR has merge conflicts... |
6a15058 to
ce81490
Compare


This PR implements full support for being able to use interfaces.
Contents:
IScriptedClassfrom Funkin')Std.isOfType / isto check whether a field is a given interface (this includes fields of source code classes also, and checking for source code interfaces).Limitations: