Skip to content

replace implicit 'to' cast with @:to function for Haxe 4.3 compatibility#24

Closed
HomuHomu833 wants to merge 1 commit into
FunkinCrew:devfrom
ShadowEngineTeam:flxuvrect-haxe-4.3
Closed

replace implicit 'to' cast with @:to function for Haxe 4.3 compatibility#24
HomuHomu833 wants to merge 1 commit into
FunkinCrew:devfrom
ShadowEngineTeam:flxuvrect-haxe-4.3

Conversation

@HomuHomu833
Copy link
Copy Markdown

haxe 4.3 introduced stricter validation for abstract from/to declarations, requiring us to do this change, the implicit to flixel.util.FlxPool.IFlxPooled on FlxUVRect fails this check since FlxRect's underlying type isn't directly IFlxPooled.

 ERROR  C:/Users/Homura/GitHub/FNF-Shadow-Engine/.haxelib/flixel/git/flixel/graphics/frames/FlxFrame.hx:764: characters 45-75

 764 | abstract FlxUVRect(FlxRect) from FlxRect to flixel.util.FlxPool.IFlxPooled
     |                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     | You can only declare from/to with compatible types

…lity

haxe 4.3 introduced stricter validation for abstract `from/to` declarations, requiring us to do this change, the implicit `to flixel.util.FlxPool.IFlxPooled`
on FlxUVRect fails this check since FlxRect's underlying type isn't directly IFlxPooled.

```bash
 ERROR  C:/Users/Homura/GitHub/FNF-Shadow-Engine/.haxelib/flixel/git/flixel/graphics/frames/FlxFrame.hx:764: characters 45-75

 764 | abstract FlxUVRect(FlxRect) from FlxRect to flixel.util.FlxPool.IFlxPooled
     |                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     | You can only declare from/to with compatible types
```
@HomuHomu833
Copy link
Copy Markdown
Author

I'm very wrong about this.

@HomuHomu833 HomuHomu833 closed this Jun 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant