Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC: Metatable type functions #69

Merged
merged 16 commits into from
Feb 4, 2025

Conversation

ffrostfall
Copy link
Contributor

@ffrostfall ffrostfall commented Nov 6, 2024

@ffrostfall ffrostfall changed the title Metatable Type Functions RFC: Metatable type functions Nov 6, 2024
@ffrostfall ffrostfall marked this pull request as ready for review November 6, 2024 16:20
@aatxe aatxe self-assigned this Dec 12, 2024
docs/metatable-type-functions.md Outdated Show resolved Hide resolved
docs/metatable-type-functions.md Outdated Show resolved Hide resolved
docs/metatable-type-functions.md Outdated Show resolved Hide resolved
docs/metatable-type-functions.md Outdated Show resolved Hide resolved
docs/metatable-type-functions.md Outdated Show resolved Hide resolved
docs/metatable-type-functions.md Show resolved Hide resolved
docs/metatable-type-functions.md Show resolved Hide resolved
docs/metatable-type-functions.md Outdated Show resolved Hide resolved
docs/metatable-type-functions.md Outdated Show resolved Hide resolved
ffrostfall and others added 5 commits February 4, 2025 00:23
docs/metatable-type-functions.md Outdated Show resolved Hide resolved
docs/metatable-type-functions.md Outdated Show resolved Hide resolved
docs/metatable-type-functions.md Outdated Show resolved Hide resolved
@vegorov-rbx
Copy link
Collaborator

If __metatable handling is specified for getmetatable to match the runtime better (where it returns a field), should setmetatable also specify the behavior when called on a type with __metatable present? (So, error that metatable cannot be set).

@ffrostfall
Copy link
Contributor Author

If __metatable handling is specified for getmetatable to match the runtime better (where it returns a field), should setmetatable also specify the behavior when called on a type with __metatable present? (So, error that metatable cannot be set).

I think it should. The purpose of types is to prevent errors, so...

@aatxe aatxe merged commit 84f9815 into luau-lang:master Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants