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

Type check bug. #811

Closed
b0ryakha opened this issue Oct 9, 2024 · 1 comment
Closed

Type check bug. #811

b0ryakha opened this issue Oct 9, 2024 · 1 comment
Labels
semantics Unexpected or unsound behaviors

Comments

@b0ryakha
Copy link

b0ryakha commented Oct 9, 2024

The error appeared in the new version, perhaps there is a keyword for it, but I did not find it in the documentation.

No error:

global record R end
global function f(value: any)

local r: R = {}
f(r)

Error by tl check: argument 1: R is not a MyAny.

global type MyAny = any
global record R end
global function f(value: MyAny)

local r: R = {}
f(r)
@hishamhm hishamhm added the semantics Unexpected or unsound behaviors label Oct 10, 2024
@hishamhm
Copy link
Member

This behavior is intentional. The type system now handles nominal types based on primitives as new distinct type declarations. See #708.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semantics Unexpected or unsound behaviors
Projects
None yet
Development

No branches or pull requests

2 participants