Closed karl-police closed 3 months ago
This is working as intended.
Luau has observed the control flow in the if
statement and determined that at the point that you're typing tbl.Property
, it must be nil
due to the original type annotation of string?
. As such, there are no autocomplete suggestions being presented here.
This is working as intended.
Luau has observed the control flow in the
if
statement and determined that at the point that you're typingtbl.Property
, it must benil
due to the original type annotation ofstring?
. As such, there are no autocomplete suggestions being presented here.
hmm yeah
usually functions where you use return over assert, are a bit meh... because the autocomplete takes the first "return" argument of a function, so it returns nil
if the first condition resolves into true, or it actually just skips through it
The autocomplete breaks because there's return
Expected result would be
This doesn't happen for![image](https://github.com/luau-lang/luau/assets/12023782/0acfd244-6270-4acc-acc6-086d5bcc3411)
It does know what type it is though.![image](https://github.com/luau-lang/luau/assets/12023782/68b31042-2d81-4243-bd91-590fe3775581)