Fix KT-22752 (#1958)
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
#include "KString.h"
|
||||
#include "Porting.h"
|
||||
#include "Types.h"
|
||||
#include "Exceptions.h"
|
||||
|
||||
#include "utf8.h"
|
||||
|
||||
@@ -26,7 +27,9 @@ extern "C" {
|
||||
|
||||
// io/Console.kt
|
||||
void Kotlin_io_Console_print(KString message) {
|
||||
RuntimeAssert(message->type_info() == theStringTypeInfo, "Must use a string");
|
||||
if (message->type_info() != theStringTypeInfo) {
|
||||
ThrowClassCastException(message->obj(), theStringTypeInfo);
|
||||
}
|
||||
// TODO: system stdout must be aware about UTF-8.
|
||||
const KChar* utf16 = CharArrayAddressOfElementAt(message, 0);
|
||||
KStdString utf8;
|
||||
|
||||
Reference in New Issue
Block a user