File tree Expand file tree Collapse file tree 4 files changed +19
-11
lines changed
src/test/kotlin/com/compiler/server
swift-export-playground/src Expand file tree Collapse file tree 4 files changed +19
-11
lines changed Original file line number Diff line number Diff line change 1
1
systemProp.kotlinVersion =2.0.0-RC2
2
2
systemProp.kotlinIdeVersion =1.9.20-506
3
3
systemProp.kotlinIdeVersionSuffix =IJ8109.175
4
- systemProp.swiftExportVersion =2.0.20-dev-3080
4
+ systemProp.swiftExportVersion =2.0.20-dev-3623
5
5
systemProp.policy =executor.policy
6
6
systemProp.indexes =indexes.json
7
7
systemProp.indexesJs =indexesJs.json
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ class SwiftConverterTest : BaseExecutorTest() {
36
36
input = " fun foo(): UInt = 42" ,
37
37
expected = """
38
38
public func foo() -> Swift.UInt32 {
39
- fatalError ()
39
+ stub ()
40
40
}
41
41
""" .trimIndent()
42
42
)
@@ -49,10 +49,10 @@ class SwiftConverterTest : BaseExecutorTest() {
49
49
50
50
public class MyClass : KotlinRuntime.KotlinBase {
51
51
public override init() {
52
- fatalError ()
52
+ stub ()
53
53
}
54
54
public func A() -> Swift.Void {
55
- fatalError ()
55
+ stub ()
56
56
}
57
57
}
58
58
""" .trimIndent()
@@ -69,7 +69,7 @@ class SwiftConverterTest : BaseExecutorTest() {
69
69
public extension Playground.foo.bar {
70
70
public static var myProperty: Swift.Int32 {
71
71
get {
72
- fatalError ()
72
+ stub ()
73
73
}
74
74
}
75
75
}
@@ -92,7 +92,7 @@ class SwiftConverterTest : BaseExecutorTest() {
92
92
input = " fun foo(): Bar = error()" ,
93
93
expected = """
94
94
public func foo() -> ERROR_TYPE {
95
- fatalError ()
95
+ stub ()
96
96
}
97
97
""" .trimIndent()
98
98
)
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ import org.jetbrains.kotlin.analysis.project.structure.builder.buildKtLibraryMod
8
8
import org.jetbrains.kotlin.analysis.project.structure.builder.buildKtSourceModule
9
9
import org.jetbrains.kotlin.platform.konan.NativePlatforms
10
10
import org.jetbrains.kotlin.psi.KtFile
11
+ import org.jetbrains.kotlin.sir.SirFunctionBody
11
12
import org.jetbrains.kotlin.sir.SirModule
12
13
import org.jetbrains.kotlin.sir.SirMutableDeclarationContainer
13
14
import org.jetbrains.kotlin.sir.util.addChild
@@ -37,7 +38,14 @@ fun runSwiftExport(
37
38
}
38
39
}
39
40
}
40
- SirAsSwiftSourcesPrinter .print (sirModule, stableDeclarationsOrder = true , renderDocComments = true )
41
+ SirAsSwiftSourcesPrinter .print (
42
+ sirModule,
43
+ stableDeclarationsOrder = true ,
44
+ renderDocComments = true ,
45
+ emptyBodyStub = SirFunctionBody (
46
+ listOf (" stub()" )
47
+ )
48
+ )
41
49
}
42
50
}
43
51
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ class SwiftExportTests {
27
27
""" ,
28
28
"""
29
29
public func foo() -> Swift.Int32 {
30
- fatalError ()
30
+ stub ()
31
31
}
32
32
"""
33
33
)
@@ -42,7 +42,7 @@ class SwiftExportTests {
42
42
43
43
public class A : KotlinRuntime.KotlinBase {
44
44
public override init() {
45
- fatalError ()
45
+ stub ()
46
46
}
47
47
}
48
48
""" .trimIndent()
@@ -59,11 +59,11 @@ class SwiftExportTests {
59
59
public class O : KotlinRuntime.KotlinBase {
60
60
public static var shared: Playground.O {
61
61
get {
62
- fatalError ()
62
+ stub ()
63
63
}
64
64
}
65
65
private override init() {
66
- fatalError ()
66
+ stub ()
67
67
}
68
68
}
69
69
""" .trimIndent()
You can’t perform that action at this time.
0 commit comments