8000 Cannot use a type function in a type with a generic being passed into a type function · Issue #1679 · luau-lang/luau · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Cannot use a type function in a type with a generic being passed into a type function #1679

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

Closed
gaymeowing opened this issue Feb 21, 2025 · 1 comment · Fixed by #1754
Closed
Assignees
Labels
bug Something isn't working new solver This issue is specific to the new solver.

Comments

@gaymeowing
Copy link
Contributor
gaymeowing commented Feb 21, 2025
type function mrrp(t)
    return types.unionof(t, types.singleton("mrrp"))
end

-- if this type is just replaced with keyof<T> theres no errors
type miaow<T> = {
    purr: keyof<T> 
}

--[[
    TypeError: Type function instance mrrp<miaow<T>> is uninhabited Luau(1037)
    TypeError: Argument of type keyof<T> is not currently serializable by type functions Luau(1048)
--]]
type meow<T> = mrrp<miaow<T>>
@gaymeowing gaymeowing added the bug Something isn't working label Feb 21, 2025
@hgoldstein hgoldstein added the new solver This issue is specific to the new solver. label Feb 21, 2025
@gaymeowing
Copy link
Contributor Author

Oops the first type error included an unnecessary intersection from when I was testing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working new solver This issue is specific to the new solver.
Development

Successfully merging a pull request may close this issue.

4 participants
0