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

Types and values not checked correctly #80

Open
lerno opened this issue Dec 1, 2018 · 5 comments
Open

Types and values not checked correctly #80

lerno opened this issue Dec 1, 2018 · 5 comments

Comments

@lerno
Copy link
Collaborator

lerno commented Dec 1, 2018

This is possible:

Foo foo = Foo;

Because we do not check during assignment whether Foo an expression-type or an expression with the type Foo.

@luciusmagn
Copy link
Contributor

tell me, for the sport, what does it compile to? (as in, if it produces any C code) 😃

@lerno
Copy link
Collaborator Author

lerno commented Dec 1, 2018

Compiles to test_Foo foo = test_Foo

@lerno
Copy link
Collaborator Author

lerno commented Dec 1, 2018

Btw I enabled sizeof(Foo.x) where x is a member of Foo. So I first saw this when it swallowed i32 a = Foo.a for exactly the same reasons. I thought it was my code that had the problem but it was a general bug.

But I actually think it would be good to be able have types as first class constructs. I wrote about it in the forum.

@bvdberg
Copy link
Member

bvdberg commented Dec 2, 2018 via email

@lerno
Copy link
Collaborator Author

lerno commented Dec 2, 2018 via email

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

No branches or pull requests

3 participants