flixel icon indicating copy to clipboard operation
flixel copied to clipboard

FlxTween: Unsupported recursive type

Open Vortex2Oblivion opened this issue 1 year ago • 2 comments

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

typedef TweenCallback = FlxTween->Void;

Vortex2Oblivion avatar May 21 '24 13:05 Vortex2Oblivion

changing it to

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

fixes it??

Vortex2Oblivion avatar May 21 '24 22:05 Vortex2Oblivion

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

Vortex2Oblivion avatar May 21 '24 22:05 Vortex2Oblivion

@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

ThePlank avatar May 22 '24 17:05 ThePlank

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

DigiEggz avatar Jun 04 '24 22:06 DigiEggz

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

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

Vortex2Oblivion avatar Jun 05 '24 14:06 Vortex2Oblivion

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

DigiEggz avatar Jun 05 '24 21:06 DigiEggz

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 avatar Jun 06 '24 00:06 47rooks

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.

DigiEggz avatar Jun 06 '24 02:06 DigiEggz

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

47rooks avatar Jun 06 '24 03:06 47rooks

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.

DigiEggz avatar Jun 06 '24 03:06 DigiEggz