You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is based on #1309 but finally I can state what is wrong.
I don't believe Free Types should be used "free". I know that Free Types are used however, they're controlled. When someone manages to define a free type out of nowhere, weird things happen. At least that's the case with Free Tables.
I lack the knowledge about type constraints yet.Otherwise I could have made a unit test that defines a local variable that would have a Free Table Type. While I think there are some examples, I had trouble with this type function and table being properly assigned as a constraint.
Obviously I don't know a lot but. Usually the autocomplete would tell you about properties that the function itself is reading from.
As example, if you'd have
functiontest(a)
if (a.entry) thenendend
If you'd do
test({@1}) I think the autocomplete would tell you about entry.
But if you're outside a function argument scope, it doesn't really make sense, I am not sure. At least for the autocomplete.
It doesn't make sense that the autocomplete shows properties that are only being read from. 🤷 You'd only need that if you're in the function argument.
Reproduction Steps
You can use the unit test, the only thing you need to replace or change is that tabletype returns a TableType with the "Free" State.
Expected Result
If not in a function body argument, the autocomplete should maybe not autocomplete things that are only being read from.
Especially when I did
tbl_Test.doesExist@1 even that part is being taken in as read and with it being a free type, it will add it into the autocomplete as well.
Actual Result
The autocomplete puts EVERYTHING that is being Read or Written.
For instance, the sole print(tbl_Test.doesntExist) causes the autocomplete to put doesntExist into the entryMap
See the screenshot above where it says read to see what was only read from.
The text was updated successfully, but these errors were encountered:
karl-police
changed the title
Free Tables and Types autocomplete "Read" outside of function bodies
Free Tables and Types autocomplete "Read" outside of the function argument scope
Sep 10, 2024
karl-police
changed the title
Free Tables and Types autocomplete "Read" outside of the function argument scope
Free Tables and Types autocomplete "Read" outside of the function argument scope in New Solver
Sep 10, 2024
karl-police
changed the title
Free Tables and Types autocomplete "Read" outside of the function argument scope in New Solver
Free Tables and Types autocomplete "properties that were read only and not written to" outside of the function argument scope in New Solver
Sep 10, 2024
karl-police
changed the title
Free Tables and Types autocomplete "properties that were read only and not written to" outside of the function argument scope in New Solver
Free Tables and Types autocomplete "properties that were only read and not written to" outside of the function argument scope in New Solver
Sep 10, 2024
karl-police
changed the title
Free Tables and Types autocomplete "properties that were only read and not written to" outside of the function argument scope in New Solver
Free Table State autocompletes "properties that were only read and not written to" outside of the function argument scope in New Solver
Sep 10, 2024
Description
This is based on #1309 but finally I can state what is wrong.
I don't believe Free Types should be used "free". I know that Free Types are used however, they're controlled. When someone manages to define a free type out of nowhere, weird things happen. At least that's the case with Free Tables.
tabletype<"free">
is a test of mine.I lack the knowledge about type constraints yet. Otherwise I could have made a unit test that defines a local variable that would have a Free Table Type. While I think there are some examples, I had trouble with this type function and table being properly assigned as a constraint.
Obviously I don't know a lot but. Usually the autocomplete would tell you about properties that the function itself is reading from.
As example, if you'd have
If you'd do
test({@1})
I think the autocomplete would tell you aboutentry
.But if you're outside a function argument scope, it doesn't really make sense, I am not sure. At least for the autocomplete.
It doesn't make sense that the autocomplete shows properties that are only being read from. 🤷 You'd only need that if you're in the function argument.
Reproduction Steps
You can use the unit test, the only thing you need to replace or change is that
tabletype
returns a TableType with the "Free" State.Expected Result
If not in a function body argument, the autocomplete should maybe not autocomplete things that are only being read from.
Especially when I did
tbl_Test.doesExist@1
even that part is being taken in asread
and with it being a free type, it will add it into the autocomplete as well.Actual Result
The autocomplete puts EVERYTHING that is being Read or Written.
For instance, the sole
print(tbl_Test.doesntExist)
causes the autocomplete to putdoesntExist
into the entryMapSee the screenshot above where it says
read
to see what was only read from.The text was updated successfully, but these errors were encountered: