Skip to content

RFC: Distinct Types#172

Closed
ratplier wants to merge 2 commits intoluau-lang:masterfrom
ratplier:master
Closed

RFC: Distinct Types#172
ratplier wants to merge 2 commits intoluau-lang:masterfrom
ratplier:master

Conversation

@ratplier
Copy link

@ratplier ratplier commented Feb 9, 2026

@hardlyardi
Copy link

I'm not sure how to feel about this being a built-in type function, that seems very incorrect:

local function foo(): newtype<string>
end
type Foo = { bar: newtype<number> }

How would these cases be handled? I feel I'd prefer a feature like this as dedicated syntax - E.g., export distinct type Foo = string

@ratplier ratplier closed this Feb 9, 2026
@ratplier
Copy link
Author

ratplier commented Feb 9, 2026

PR closed because this is a clone; #123

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants