Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong emit on complex LuaTuple $dbg #6

Open
Dionysusnu opened this issue Jun 12, 2022 · 1 comment
Open

Wrong emit on complex LuaTuple $dbg #6

Dionysusnu opened this issue Jun 12, 2022 · 1 comment

Comments

@Dionysusnu
Copy link

Basing off of the example in the readme:

function test() {
	return 10;
}
const value = $dbg(test());
local function test() 
	return 10
end
local value = (function(value)
	print("[source.ts:4] test() =", value)
	return value
end)(test())

will be wrong if test returns a LuaTuple, only catching the first element of it. This should be easy to change, albeit with a performance hit, by using ...values.

@Vorlias
Copy link
Member

Vorlias commented Jun 12, 2022

Could also have a check for that particular macro symbol and adjust the emit accordingly :?

Not sure how tough that'd be from a transformer perspective, but yeah.

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

No branches or pull requests

2 participants