rbxts-flamework / core

Flamework is an extensible game framework. It requires typescript and offers many useful features.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Macro nesting doesn't work if done between class methods

rimuy opened this issue · comments

When using macro nesting between methods, flamework throws an error and says the generic type from Modding.Many hasn't been encountered.

image

Minimal repro:

import { Modding } from "@flamework/core";

class Foo {
	/** @metadata macro */
	say<T extends string>(message: string, _text: Modding.Many<T>) {
		print(message, _text);
	}

	/** @metadata macro */
	sayHello<T extends string>(_text: Modding.Many<T>) {
		assert(_text);

		this.say<T>("Hello ", _text);
	}
}

Also I'm pretty sure in this case it would be unnecessary for this.say to need being called with a generic type? since the base macro is already receiving its modded parameter.