Skip to content

Commit 3575aa4

Browse files
committed
Override error about using JS legacy compiler
JetBrains/kotlin@f9cbd57
1 parent 1e0f391 commit 3575aa4

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

core/src/main/kotlin/com/tschuchort/compiletesting/KotlinJsCompilation.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ class KotlinJsCompilation : AbstractKotlinCompilation<K2JSCompilerArguments>() {
3333
/** Specify a compilation module name for IR backend */
3434
var irModuleName: String? = null
3535

36+
/** Use deprecated legacy compiler without error */
37+
var useDeprecatedLegacyCompiler: Boolean = false
38+
3639
/**
3740
* Path to the kotlin-stdlib-js.jar
3841
* If none is given, it will be searched for in the host
@@ -88,6 +91,7 @@ class KotlinJsCompilation : AbstractKotlinCompilation<K2JSCompilerArguments>() {
8891
args.irOnly = irOnly
8992
args.irModuleName = irModuleName
9093
args.generateDts = generateDts
94+
args.useDeprecatedLegacyCompiler = useDeprecatedLegacyCompiler
9195
}
9296

9397
/** Runs the compilation task */

core/src/test/kotlin/com/tschuchort/compiletesting/TestUtils.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,12 @@ fun defaultCompilerConfig(): KotlinCompilation {
1515
}
1616

1717
fun defaultJsCompilerConfig(): KotlinJsCompilation {
18-
return KotlinJsCompilation( ).apply {
18+
return KotlinJsCompilation().apply {
1919
inheritClassPath = false
2020
verbose = true
2121
reportOutputFiles = false
2222
messageOutputStream = System.out
23+
useDeprecatedLegacyCompiler = true
2324
}
2425
}
2526

0 commit comments

Comments
 (0)