[K/N] Any.isFrozen is now always false when freezing is disabled
This commit is contained in:
@@ -2627,6 +2627,7 @@ __attribute__((swift_name("ValuesKt")))
|
||||
+ (KtTripleVals<id> * _Nullable)getValue3:(id _Nullable)receiver __attribute__((swift_name("getValue3(_:)")));
|
||||
+ (KtTripleVals<id> * _Nullable)getValueOrNull3:(id _Nullable)receiver __attribute__((swift_name("getValueOrNull3(_:)")));
|
||||
+ (BOOL)isFrozenObj:(id)obj __attribute__((swift_name("isFrozen(obj:)")));
|
||||
+ (BOOL)isFreezingEnabled __attribute__((swift_name("isFreezingEnabled()")));
|
||||
+ (id)kotlinLambdaBlock:(id (^)(id))block __attribute__((swift_name("kotlinLambda(block:)")));
|
||||
+ (int64_t)multiplyInt:(int32_t)int_ long:(int64_t)long_ __attribute__((swift_name("multiply(int:long:)")));
|
||||
|
||||
|
||||
@@ -2569,6 +2569,7 @@ __attribute__((swift_name("ValuesKt")))
|
||||
+ (KtTripleVals<id> * _Nullable)getValue3:(id _Nullable)receiver __attribute__((swift_name("getValue3(_:)")));
|
||||
+ (KtTripleVals<id> * _Nullable)getValueOrNull3:(id _Nullable)receiver __attribute__((swift_name("getValueOrNull3(_:)")));
|
||||
+ (BOOL)isFrozenObj:(id)obj __attribute__((swift_name("isFrozen(obj:)")));
|
||||
+ (BOOL)isFreezingEnabled __attribute__((swift_name("isFreezingEnabled()")));
|
||||
+ (id)kotlinLambdaBlock:(id (^)(id))block __attribute__((swift_name("kotlinLambda(block:)")));
|
||||
+ (int64_t)multiplyInt:(int32_t)int_ long:(int64_t)long_ __attribute__((swift_name("multiply(int:long:)")));
|
||||
|
||||
|
||||
@@ -2569,6 +2569,7 @@ __attribute__((swift_name("ValuesKt")))
|
||||
+ (KtTripleVals * _Nullable)getValue3:(id _Nullable)receiver __attribute__((swift_name("getValue3(_:)")));
|
||||
+ (KtTripleVals * _Nullable)getValueOrNull3:(id _Nullable)receiver __attribute__((swift_name("getValueOrNull3(_:)")));
|
||||
+ (BOOL)isFrozenObj:(id)obj __attribute__((swift_name("isFrozen(obj:)")));
|
||||
+ (BOOL)isFreezingEnabled __attribute__((swift_name("isFreezingEnabled()")));
|
||||
+ (id)kotlinLambdaBlock:(id (^)(id))block __attribute__((swift_name("kotlinLambda(block:)")));
|
||||
+ (int64_t)multiplyInt:(int32_t)int_ long:(int64_t)long_ __attribute__((swift_name("multiply(int:long:)")));
|
||||
|
||||
|
||||
@@ -250,6 +250,7 @@ fun IC3.getValue3() = value
|
||||
fun IC3?.getValueOrNull3() = this?.value
|
||||
|
||||
fun isFrozen(obj: Any): Boolean = obj.isFrozen
|
||||
fun isFreezingEnabled() = Platform.isFreezingEnabled
|
||||
fun kotlinLambda(block: (Any) -> Any): Any = block
|
||||
|
||||
fun multiply(int: Int, long: Long) = int * long
|
||||
|
||||
@@ -590,6 +590,9 @@ class TestSharedIImpl : NSObject, I {
|
||||
}
|
||||
|
||||
func testShared() throws {
|
||||
if !ValuesKt.isFreezingEnabled() {
|
||||
return;
|
||||
}
|
||||
func assertFrozen(_ obj: AnyObject) throws {
|
||||
try assertTrue(ValuesKt.isFrozen(obj: obj), "isFrozen(\(obj))")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user