luau-lang / luau

A fast, small, safe, gradually typed embeddable scripting language derived from Lua
https://luau-lang.org
MIT License
3.8k stars 352 forks source link

Luau Debugger triggered, class-like table method #1195

Closed karl-police closed 3 months ago

karl-police commented 3 months ago
local name = {}
name.__index = name

function name.new()
    local self = {}

    return setmetatable(self, name)
end

function name:

end

image

If you copy paste the code snippet it should trigger the orange line, move your cursor towards function name: and erase : and then put it back

vegorov-rbx commented 3 months ago

Luau project doesn't have a UI like that, please report the issues on the application where you see this.

karl-police commented 3 months ago

Luau project doesn't have a UI like that, please report the issues on the application where you see this.

oh

karl-police commented 2 months ago

This was fixed by Studio, I'm just gonna note this here

aatxe commented 2 months ago

It was fixed by us, not Studio, this bug report just did not have the details. As best as I can tell from your various posts in here and in discussions, you were attempting to use the unreleased new type solver using the debug flag that it is behind, and it crashed. If my understanding is right, that's totally fine, but please when you make a report in the future give the necessary context for someone to understand what you're doing. You should specify you're testing the unreleased type solver, the flag you used to enable it, and a description of how to reproduce it. Dumping a screenshot of Studio is not a useful bug report.

karl-police commented 2 months ago

It was fixed by us, not Studio, this bug report just did not have the details. As best as I can tell from your various posts in here and in discussions, you were attempting to use the unreleased new type solver using the debug flag that it is behind, and it crashed. If my understanding is right, that's totally fine, but please when you make a report in the future give the necessary context for someone to understand what you're doing. You should specify you're testing the unreleased type solver, the flag you used to enable it, and a description of how to reproduce it. Dumping a screenshot of Studio is not a useful bug report.

Ah, I see. I left that be, because I heard Studio issues are not valid here. And the FFlag was a Studio thing. And I don't know how one is ment to enable FFlag's Luau wise. It was probably disabled as well, hence I couldn't repro it in a Luau binary, not sure. I sorta went into the Luau code to force enable it, but I might didn't do it right.

I checked all my other reported issues that I closed, and when I checked again I couldn't repo them all, so I assume those were also all fixed.

 

There's a new issue in Studio, but that only occurs on the Internal Studio which enables Built-In Code Snippets in the autocompletion, e.g. the auto-completion for those Code Snippets triggers at places where it is unintended. But I believe these code snippets are not part of Luau at all. The method they're using for the autocompletion, maybe is, but I don't know.