JS: minor, do not use '==' on descriptors from built-ins

Use KotlinBuiltIns.isString instead of equality with
KotlinBuiltIns.string, which is more portable across different module
configurations. Also use isSubtypeOf instead of
DescriptorUtils.isSubclass and thus get rid of an extra error on an
unresolved class in nativeAnnotationCheckers.kt
This commit is contained in:
Alexander Udalov
2019-01-17 19:12:18 +01:00
parent 31670622c0
commit d5fd160fd3
2 changed files with 9 additions and 9 deletions
@@ -22,10 +22,10 @@ fun Int.set6(a: Double, v: String): <!NATIVE_SETTER_WRONG_RETURN_TYPE!>Number<!>
fun Any.foo(<!NATIVE_INDEXER_CAN_NOT_HAVE_DEFAULT_ARGUMENTS!>a: String = "0.0"<!>, <!NATIVE_INDEXER_CAN_NOT_HAVE_DEFAULT_ARGUMENTS!>v: String = "str"<!>) = "OK"
<!NATIVE_INDEXER_WRONG_PARAMETER_COUNT!>@nativeSetter
fun Int.set(<!NATIVE_INDEXER_KEY_SHOULD_BE_STRING_OR_NUMBER!>a: <!UNRESOLVED_REFERENCE!>A<!><!>): Int?<!> = 1
fun Int.set(a: <!UNRESOLVED_REFERENCE!>A<!>): Int?<!> = 1
<!NATIVE_INDEXER_WRONG_PARAMETER_COUNT!>@nativeSetter
fun Int.set2(): String?<!> = "OK"
<!NATIVE_INDEXER_WRONG_PARAMETER_COUNT!>@nativeSetter
fun Int.set3(<!NATIVE_INDEXER_KEY_SHOULD_BE_STRING_OR_NUMBER!>a: Any<!>, b: Int, c: Any?)<!> {}
fun Int.set3(<!NATIVE_INDEXER_KEY_SHOULD_BE_STRING_OR_NUMBER!>a: Any<!>, b: Int, c: Any?)<!> {}