Skip to content

Vectors & typechecker? #385

Answered by zeux
petrihakkinen asked this question in Q&A
Feb 22, 2022 · 1 comments · 5 replies
Discussion options

You must be logged in to vote

https://github.com/Roblox/luau/blob/master/fuzz/proto.cpp#L101-L115 has a basic example (note that it omits other metamethods for simplicity); from the type checkers perspective right now vector isn't a primitive type (we mostly didn't have to change this when introducing a new primitive type, but also type checker currently may not always respect metatable __index so replacing this with a primitive type may require further work inside the type checker).

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@petrihakkinen
Comment options

@petrihakkinen
Comment options

@petrihakkinen
Comment options

@zeux
Comment options

@petrihakkinen
Comment options

Answer selected by petrihakkinen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants