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

The type checker doesn't distinguish an object from its class #171

Open
echebbi opened this issue Jul 3, 2020 · 0 comments
Open

The type checker doesn't distinguish an object from its class #171

echebbi opened this issue Jul 3, 2020 · 0 comments
Labels

Comments

@echebbi
Copy link
Collaborator

echebbi commented Jul 3, 2020

Bug description

We can assign a class to an object of this class.

Expected behavior

The type checker complains about an illegal assignment.

How to reproduce

Steps to reproduce the behavior:

  1. Import the helloworld example project
  2. Write the following code:
    open class HelloWorld {
    
       @main
       def void main() {
           HelloWorld world := helloworld::HelloWorld;
           world.log();
       }
    
    }
  3. No error (correct code is HelloWorld world := helloworld::HelloWorld.create();)

Additional context

@echebbi echebbi added the bug label Jul 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant