[K/N] Add test-case for KT-49034
This commit is contained in:
@@ -0,0 +1 @@
|
||||
language = Objective-C
|
||||
@@ -0,0 +1 @@
|
||||
@class __darwin_fp_control;
|
||||
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
import objcnames.classes.__darwin_fp_control
|
||||
|
||||
open class C<T : kotlinx.cinterop.ObjCObject>
|
||||
|
||||
class D : C<__darwin_fp_control>()
|
||||
|
||||
fun main() {
|
||||
println(D())
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
language = Objective-C
|
||||
@@ -0,0 +1 @@
|
||||
@protocol __darwin_fp_control;
|
||||
@@ -0,0 +1,14 @@
|
||||
/*
|
||||
* Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
import objcnames.protocols.__darwin_fp_control
|
||||
|
||||
open class C<T : kotlinx.cinterop.ObjCObject>
|
||||
|
||||
class D : C<__darwin_fp_control>()
|
||||
|
||||
fun main() {
|
||||
println(D())
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
#include "kt49034.h"
|
||||
|
||||
struct JSContext {
|
||||
int field;
|
||||
};
|
||||
|
||||
struct JSContext global = { 15 };
|
||||
|
||||
extern "C" struct JSContext* bar() {
|
||||
return &global;
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct JSContext;
|
||||
|
||||
struct JSContext* bar();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,16 @@
|
||||
/*
|
||||
* Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
import kt49034.bar
|
||||
import cnames.structs.JSContext
|
||||
import kotlinx.cinterop.CPointer
|
||||
|
||||
fun baz(s: CPointer<JSContext>) {
|
||||
println(s)
|
||||
}
|
||||
|
||||
fun main() {
|
||||
baz(bar()!!)
|
||||
}
|
||||
Reference in New Issue
Block a user