Skip to content

Commit defa464

Browse files
committed
[Compiler plugin] Avoid exception throwing get in favor of getOrNull
1 parent 4da5ffd commit defa464

File tree

1 file changed

+1
-1
lines changed
  • plugins/kotlin-dataframe/src/org/jetbrains/kotlinx/dataframe/plugin

1 file changed

+1
-1
lines changed

plugins/kotlin-dataframe/src/org/jetbrains/kotlinx/dataframe/plugin/interpret.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ fun <T> KotlinTypeFacade.interpret(
148148
val interpreter = expression.loadInterpreter()
149149
if (interpreter == null) {
150150
// if the plugin already transformed call, its original form is the last expression of .let { }
151-
val argument = expression.arguments[0]
151+
val argument = expression.arguments.getOrNull(0)
152152
val last = (argument as? FirAnonymousFunctionExpression)?.anonymousFunction?.body?.statements?.lastOrNull()
153153
val call = (last as? FirReturnExpression)?.result as? FirFunctionCall
154154
call?.loadInterpreter()?.let {

0 commit comments

Comments
 (0)