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

Dangling expression should throw a compilation error #8832

Closed
Akirathan opened this issue Jan 23, 2024 · 3 comments · Fixed by #8877
Closed

Dangling expression should throw a compilation error #8832

Akirathan opened this issue Jan 23, 2024 · 3 comments · Fixed by #8877
Assignees
Labels

Comments

@Akirathan
Copy link
Member

The following code compiles, but fails at runtime on "No such method 'method'":

type T
    Value

    method self
        IO.println "Forgot to type ="

main =
    t = T.Value
    t.method

I would expect a compilation error. There is a dangling IO.println expression that does not belong to any method.

Moreover, the following snippet:

type T
  static_method
    IO.println "Forgot to type ="

main = T.static_method

Does not fail in compilation either and prints static_method. It should fail on compilation error as well.

@Akirathan Akirathan changed the title Declaration of a method without an assignment operator does not throw compiler error Dangling expression should throw a compilation error Jan 23, 2024
@JaroslavTulach JaroslavTulach moved this from ❓New to 📤 Backlog in Issues Board Jan 23, 2024
@JaroslavTulach JaroslavTulach moved this from 📤 Backlog to 👁️ Code review in Issues Board Jan 26, 2024
@enso-bot
Copy link

enso-bot bot commented Jan 27, 2024

Jaroslav Tulach reports a new STANDUP for yesterday (2024-01-26):

Progress: - PR that fixes #8832 #8877

Next Day: BigDecimal CI fighting

@mergify mergify bot closed this as completed in #8877 Jan 28, 2024
mergify bot pushed a commit that referenced this issue Jan 28, 2024
Fixes #8832 by reporting a `SyntaxError` in `TreeToIr` conversion.
@github-project-automation github-project-automation bot moved this from 👁️ Code review to 🟢 Accepted in Issues Board Jan 28, 2024
@enso-bot
Copy link

enso-bot bot commented Jan 29, 2024

Jaroslav Tulach reports a new STANDUP for yesterday (2024-01-28):

Progress: - binary operators integrated: https://github.com/enso-org/enso/blob/234417a7be91c8966e5ee05c54a0777a09194a29/docs/syntax/functions.md#type-ascriptions-and-operator-resolution

Next Day: Multi threaded JavaScript access in GraalVM

@enso-bot
Copy link

enso-bot bot commented Jan 30, 2024

Jaroslav Tulach reports a new STANDUP for yesterday (2024-01-29):

Progress: - #8832 fixed by integrating #8877

Next Day: Planning next work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants