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

Mismatch in line number betwen tl and generated lua #807

Closed
svermeulen opened this issue Sep 23, 2024 · 1 comment
Closed

Mismatch in line number betwen tl and generated lua #807

svermeulen opened this issue Sep 23, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@svermeulen
Copy link

Running "tl gen" with the following code:


local record Foo
end

function Foo:greet(
      greeting:string)
   print(greeting)
end

Produces this lua:


local Foo = {}


function Foo:greet(   greeting)
   print(greeting)
end

I would have expected greeting to be on the next line similar to the teal file. I encountered this issue because I noticed my stack traces were sometimes 1 or 2 lines off from what I was expecting, since all it takes is one of these cases at top of the file to throw off stack traces for the rest of the file.

Tested both in next branch and also whatever is currently on luarocks

@hishamhm hishamhm added the bug Something isn't working label Sep 23, 2024
@hishamhm
Copy link
Member

hishamhm commented Oct 8, 2024

@svermeulen Thanks for the report and testcase! Fixed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants