Add Throwable class into interpreter builtins map
Methods of Throwable class doesn't have bodies using FIR, so they must be handled as builtins
This commit is contained in:
committed by
TeamCityServer
parent
8234c9cec1
commit
e5617ede7e
+6
@@ -165,6 +165,12 @@ internal fun interpretUnaryFunction(name: String, type: String, a: Any?): Any? {
|
||||
"String" -> return (a as String).length
|
||||
"CharSequence" -> return (a as CharSequence).length
|
||||
}
|
||||
"cause" -> when (type) {
|
||||
"Throwable" -> return (a as Throwable).cause
|
||||
}
|
||||
"message" -> when (type) {
|
||||
"Throwable" -> return (a as Throwable).message
|
||||
}
|
||||
"size" -> when (type) {
|
||||
"BooleanArray" -> return (a as BooleanArray).size
|
||||
"CharArray" -> return (a as CharArray).size
|
||||
|
||||
Reference in New Issue
Block a user