[JS] Mark necessary methods that must be evaluated at compile-time

It includes methods and properties from Boolean, Char, String,
Enum and KCallable.
This commit is contained in:
Ivan Kylchik
2023-02-02 12:18:49 +01:00
committed by Space Team
parent fcd3fe4fe3
commit 695229e288
10 changed files with 252 additions and 82 deletions
@@ -17,8 +17,10 @@ public class String : Comparable<String>, CharSequence {
/**
* Returns a string obtained by concatenating this string with the string representation of the given [other] object.
*/
@kotlin.internal.IntrinsicConstEvaluation
public operator fun plus(other: Any?): String
@kotlin.internal.IntrinsicConstEvaluation
public override val length: Int
/**
@@ -27,15 +29,19 @@ public class String : Comparable<String>, CharSequence {
* If the [index] is out of bounds of this string, throws an [IndexOutOfBoundsException] except in Kotlin/JS
* where the behavior is unspecified.
*/
@kotlin.internal.IntrinsicConstEvaluation
public override fun get(index: Int): Char
public override fun subSequence(startIndex: Int, endIndex: Int): CharSequence
@kotlin.internal.IntrinsicConstEvaluation
public override fun compareTo(other: String): Int
@kotlin.internal.IntrinsicConstEvaluation
public override fun equals(other: Any?): Boolean
public override fun hashCode(): Int
@kotlin.internal.IntrinsicConstEvaluation
public override fun toString(): String
}