HaxeFlixel / flixel

Free, cross-platform 2D game engine powered by Haxe and OpenFL
https://haxeflixel.com/
MIT License
1.92k stars 427 forks source link

FlxTween: Unsupported recursive type #3149

Closed Vortex2Oblivion closed 3 weeks ago

Vortex2Oblivion commented 1 month ago

Getting a compiler error when targeting for hashlink in FlxTween on line 938 which is

typedef TweenCallback = FlxTween->Void;
Vortex2Oblivion commented 1 month ago

changing it to

typedef TweenCallback = #if hl Dynamic #else FlxTween #end->Void;

fixes it??

Vortex2Oblivion commented 1 month ago

@CobaltBar pinging you since you're having the same issue

ThePlank commented 1 month ago

@CobaltBar @Vortex2Oblivion, can both of you try building the FlxTween demo? (without the fix vortex found) just to verify that this isn't a project related issue since i've not been able to reproduce the same error

DigiEggz commented 4 weeks ago

@CobaltBar @Vortex2Oblivion Which host platform are you compiling on?

Vortex2Oblivion commented 4 weeks ago

@CobaltBar @Vortex2Oblivion Which host platform are you compiling on?

Windows 11 me and (I think) cobaltbar is on Linux

DigiEggz commented 4 weeks ago

Sample project that reproduces the error Edit: Uncomment out the transition:TransitionEffect; variable in PlayState to trigger. Demo.zip

47rooks commented 4 weeks ago

You don't list steps or versions but I was able to build it withlime build hl on

haxe 4.3.3 flixel 5.6.2 flixel-addons 3.2.3 Hashlink 1.14 Win 10

Tried turning off dce as transition is not used anywhere. Still didn't repro.

DigiEggz commented 4 weeks ago

You don't list steps or versions but I was able to build it withlime build hl on

haxe 4.3.3 flixel 5.6.2 flixel-addons 3.2.3 Hashlink 1.14 Win 10

Tried turning off dce as transition is not used anywhere. Still didn't repro.

@47rooks Sorry for the lack of details. You'll need to test using flixel 5.7.0 or later. It occurs due to the FlickerTweenOptions typedef introduced in FlxTween.

47rooks commented 4 weeks ago

Ok, now I can repro it - just updating to flixel 5.7.0 was enough. Next question is why ?

DigiEggz commented 4 weeks ago

Ok, now I can repro it - just updating to flixel 5.7.0 was enough. Next question is why ?

The compiler is having a problem somewhere when handling the typedef FlickerTweenOptions = TweenOptions { … } assignment in FlickerTween. The TransitionData class in flixel-addons defines a TweenOptions variable and it does not like that. I'll test a few things tomorrow to see if it's a localized problem.