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

incorrect emit for arrow functions defined in the scope of a function that is used as a default parameter #2357

Open
Nowaaru opened this issue May 3, 2023 · 0 comments

Comments

@Nowaaru
Copy link

Nowaaru commented May 3, 2023

Oh God, the edge case
- Dionysusnu

Repro from fireboltofdeath is here.

Expected emit is to be something like this:

-- Compiled with roblox-ts v2.1.0
local x = function(f)
	if f == nil then
		f = function()
                        local y
			y = function()
				return print(y)
			end
		end
	end
	return nil
end
return nil

sorry fireboltofdeath for making this so hard, i am not very bright

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

1 participant