Skip to content

[BUG] Function arguments can persist in other functions #346

@NotHyper-474

Description

@NotHyper-474

This code snippet should be enough. Apparently this has been a bug for a very long time, considering Nene's script's moveByNoteKind seems to accidentally make use of it since, despite having a "kind" argument, it's using onNoteHit's "event" argument instead.

Image
import funkin.modding.module.Module;

class Issue346 extends Module
{
	public function new()
	{
		super('IssueBug');
	}

	override function onCreate(event)
	{
		someFunc();
	}

	function someFunc():Void
	{
		// Traces event even though it should only exist in the function that called it.
		trace(event);
	}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions