Continue expressions
Closed this issue · 8 comments
wilkomanger commented
Continue expressions
wilkomanger commented
@eggnstone Done!
eggnstone commented
Awesome!
Unfortunately I still get it:
Exception in thread "main" org.dotlin.compiler.backend.DotlinTransformerError: Transformer error occurred: An operation is not implemented: IrContinueImpl is not supported
While processing:
CONTINUE label=null loop.label=null
at org.dotlin.compiler.backend.ErrorsKt$runAndReportTransformerError$1.invoke(Errors.kt:96)
at org.dotlin.compiler.backend.ErrorsKt$runAndReportTransformerError$1.invoke(Errors.kt:96)
at org.dotlin.compiler.backend.ErrorsKt.runAndReport(Errors.kt:89)
at org.dotlin.compiler.backend.ErrorsKt.runAndReportTransformerError(Errors.kt:96)
...
at com.github.ajalt.clikt.core.CliktCommand.parse(CliktCommand.kt:400)
at com.github.ajalt.clikt.core.CliktCommand.parse$default(CliktCommand.kt:397)
at com.github.ajalt.clikt.core.CliktCommand.main(CliktCommand.kt:415)
at com.github.ajalt.clikt.core.CliktCommand.main(CliktCommand.kt:440)
at org.dotlin.compiler.Dotlin.main(Main.kt:26)
Caused by: kotlin.NotImplementedError: An operation is not implemented: IrContinueImpl is not supported
at org.dotlin.compiler.backend.steps.ir2ast.ir.IrUtilsKt.todo(IrUtils.kt:261)
at org.dotlin.compiler.backend.steps.ir2ast.transformer.IrDartAstTransformer.visitElement(IrDartAstTransformer.kt:34)
at org.dotlin.compiler.backend.steps.ir2ast.transformer.IrDartAstTransformer.visitElement(IrDartAstTransformer.kt:31)
at org.jetbrains.kotlin.ir.visitors.IrElementVisitor$DefaultImpls.visitExpression(IrElementVisitor.kt:156)
at org.dotlin.compiler.backend.steps.ir2ast.transformer.IrDartAstTransformer.visitExpression(IrDartAstTransformer.kt:576)
at org.dotlin.compiler.backend.steps.ir2ast.transformer.IrDartAstTransformer$visitExpression$1$1.invoke(IrDartAstTransformer.kt:573)
at org.dotlin.compiler.backend.steps.ir2ast.transformer.IrDartAstTransformer$visitExpression$1$1.invoke(IrDartAstTransformer.kt:573)
at org.dotlin.compiler.backend.ErrorsKt.runAndReport(Errors.kt:86)
... 237 more
wilkomanger commented
Can you show me the code (you think) caused this?
eggnstone commented
No idea :(
I use continue
all over the place.
Could you add the location to the exception?
eggnstone commented
I narrowed it down to TypeSplitter.kt
It has 2 continue
s in a for
loop and if I replaced them both with TODO()
then it compiles.
wilkomanger commented
Ah, thanks! I was about to say that you should already see source info 🤔 So that's also strange.
But I'll have a look and fix it 👍
wilkomanger commented
I didn't get the exact same error as you, but I did get (possibly related) errors when running that code and fixed them, can you try again at 9f40aae?
eggnstone commented
Exception in thread "main" org.dotlin.compiler.backend.DotlinTransformerError: Transformer error occurred: class org.jetbrains.kotlin.ir.expressions.impl.IrTryImpl cannot be cast to class org.jetbrains.kotlin.ir.declarations.IrVariable (org.jetbrains.kotlin.ir.expressions.impl.IrTryImpl and org.jetbrains.kotlin.ir.declarations.IrVariable are in unnamed module of loader 'app')
While processing:
BLOCK type=kotlin.Unit origin=FOR_LOOP
at org.dotlin.compiler.backend.ErrorsKt$runAndReportTransformerError$1.invoke(Errors.kt:96)
at org.dotlin.compiler.backend.ErrorsKt$runAndReportTransformerError$1.invoke(Errors.kt:96)
at org.dotlin.compiler.backend.ErrorsKt.runAndReport(Errors.kt:89)