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

Internal error for if expression #47

Closed
devcrocod opened this issue Feb 18, 2020 · 6 comments
Closed

Internal error for if expression #47

devcrocod opened this issue Feb 18, 2020 · 6 comments
Labels
wait for answer The issue waits for opener's action or answer

Comments

@devcrocod
Copy link
Contributor

When executing the following code:

fun test() {
    if() {    }
}

error:

Back-end (JVM) Internal error: Failed to generate expression: KtIfExpression
File being compiled: (2,5) in Line_1.jupyter.kts
The root cause java.lang.IllegalArgumentException was thrown at: org.jetbrains.kotlin.codegen.ExpressionCodegen.$$$reportNull$$$0(ExpressionCodegen.java)

I expect compilation error in readable form.

@ileasile
Copy link
Collaborator

Should be fixed in the latest version 0.7.41.254.dev1, please check
image

@ileasile ileasile added the wait for answer The issue waits for opener's action or answer label Apr 21, 2020
@devcrocod
Copy link
Contributor Author

It works, thanks.

It also works with when. But doesn't emphasize where the error is, is it normal?
image

@ileasile
Copy link
Collaborator

Cannot reproduce it. For me error is emphasized. Recheck it please for version 0.7.41.255.dev8

@devcrocod
Copy link
Contributor Author

I found that this does not work in jupyter-lab. Now if and when are not underlined on error for version 0.7.41.255.dev8.
In jupyter-notebook it works correctly.

@ileasile
Copy link
Collaborator

It should not work in Lab, because JS extension is only applicable to jupyter-notebook frontend. Error messages are sent, but not rendered. Same thing for completion: it works only for Tab, not on type.

@ileasile
Copy link
Collaborator

So, if it's ok in Notebook, I will close the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wait for answer The issue waits for opener's action or answer
Projects
None yet
Development

No branches or pull requests

2 participants