Scripting: Implement conditional conversion for REPL result values
to support value types erased from runtime classes. See example in added tests for motivation. #KT-45065 fixed also refactor launcher repl test and result type rendering
This commit is contained in:
@@ -126,7 +126,7 @@ interface ReplEvalAction {
|
||||
}
|
||||
|
||||
sealed class ReplEvalResult : Serializable {
|
||||
class ValueResult(val name: String, val value: Any?, val type: String?) : ReplEvalResult() {
|
||||
class ValueResult(val name: String, val value: Any?, val type: String?, val snippetInstance: Any? = null) : ReplEvalResult() {
|
||||
override fun toString(): String {
|
||||
val v = if (value is Function<*>) "<function${TypeIntrinsics.getFunctionArity(value)}>" else value
|
||||
return "$name: $type = $v"
|
||||
|
||||
Reference in New Issue
Block a user