Skip to content

[FIX] Fix calling instance inline functions of abstracts#334

Merged
EliteMasterEric merged 1 commit intoFunkinCrew:experimental-abstractsfrom
lemz1:fix/inline-abstract-functions
Feb 16, 2026
Merged

[FIX] Fix calling instance inline functions of abstracts#334
EliteMasterEric merged 1 commit intoFunkinCrew:experimental-abstractsfrom
lemz1:fix/inline-abstract-functions

Conversation

@lemz1
Copy link

@lemz1 lemz1 commented Feb 8, 2026

This pr fixes inline abstract functions that assign to this directly.

script.hxc:

import flixel.FlxBasic;
import flixel.util.FlxColor;

class TestScriptedClass extends FlxBasic {
    public function new() {
        super();

        var color = FlxColor.RED;
        trace(color);
        FlxColor.setRGB(color, 255, 255, 255, 255);
        trace(color);
    }
}

before:

hscriptClass(mods/introMod/script.hxc):9: -65536
hscriptClass(mods/introMod/script.hxc):11: -65536

after:

hscriptClass(mods/introMod/script.hxc):9: -65536
hscriptClass(mods/introMod/script.hxc):11: -1

@lemz1 lemz1 marked this pull request as draft February 8, 2026 02:30
@lemz1 lemz1 force-pushed the fix/inline-abstract-functions branch from 87eb833 to d809fac Compare February 8, 2026 04:50
@lemz1 lemz1 marked this pull request as ready for review February 8, 2026 04:50
@lemz1 lemz1 force-pushed the fix/inline-abstract-functions branch from d878bc6 to e142f43 Compare February 8, 2026 04:54
continue;
if (k != MethInline) continue;
if (abstractPath.startsWith('cpp')) continue;
if (abstractPath.startsWith('flixel.graphics.atlas.HashOrArray')) continue; // has to be ragebait
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HashOrArray seems to not work with the type parameter being Dynamic
if someone knows a fix or workaround please let me know

@AbnormalPoof AbnormalPoof self-requested a review February 11, 2026 02:06
@EliteMasterEric
Copy link
Member

@lemz1 I rebased the experimental-abstracts branch to the latest experimental and that means this branch needs its own rebase.

@lemz1 lemz1 force-pushed the fix/inline-abstract-functions branch from e142f43 to 96ad169 Compare February 16, 2026 14:03
@lemz1
Copy link
Author

lemz1 commented Feb 16, 2026

i hope i didnt break anything during the rebase

@EliteMasterEric EliteMasterEric merged commit b32f1b0 into FunkinCrew:experimental-abstracts Feb 16, 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.

2 participants