Read-only/Write-only extern properties, Read-only vector properties#2071
Read-only/Write-only extern properties, Read-only vector properties#2071PhoenixWhitefire wants to merge 25 commits intoluau-lang:masterfrom
vector properties#2071Conversation
… and make `vector` properties read-only Adds support for `read` and `write` property attributes for extern type declarations The structure is intended to be the same as for table types: declare extern type E as (read/write/<blank>) <property>: T end Modifies the embedded type definition of `vector`s to mark `.x`, `.y` and `.z` as read-only
My mistake!
This is after migrating to the latest version of Luau, the previous changes were actually written on the *prior* release and copied over (imperfectly) but it should all be good now
|
I don't know what any of these means but I think they're pretty cool |
andyfriesen
left a comment
There was a problem hiding this comment.
Thanks for the patch!
This all looks fine. We just need you to flag it before we can merge it.
…rReadOnly", Added newline to Makefile
In order to maintain the `LuauTypeCheckerVectorLerp2` flag, I would have to add 2 extra copies of the `vector` library definitions. `vector.lerp` has been out for several months now anyway, the rest of the rollout flags should also probably be removed...
Now, it only affects the fastcall guard
|
The flags |
I need to fix this bug in 2 different PRs, so I'm flagging it with a non-PR-specific name
|
Added the flag |
|
|
…Add 1 test, Rename some variables due to name collisions
Implements the
readandwriteproperty attributes for external type definitions, which the embeddedvectortype now makes use of:Before:
After:
The following code now creates type-errors in the expected places:
This PR also supports different read/write types:
Additionally,
LuauLValueCompoundAssignmentVisitLhs,LuauExternReadWriteAttributesandLuauTypeCheckerVectorReadOnlyflagsCloses #2062