Skip to content

Commit dee7fcb

Browse files
authored
update: updating compiler-reference with -jvm-default (#4915)
* update: updating compiler-reference with jvm-default * adding an additional table for clarity * making section more concise
1 parent e1d6f9b commit dee7fcb

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

docs/topics/compiler-reference.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,16 @@ Generate boxed versions of all inline value classes in the module, along with bo
269269
making both accessible from Java. For more information, see [Inline value classes](java-to-kotlin-interop.md#inline-value-classes)
270270
in the guide to calling Kotlin from Java.
271271

272+
### -jvm-default _mode_
273+
274+
Control how functions declared in interfaces are compiled to default methods on the JVM.
275+
276+
| Mode | Description |
277+
|--------------------|-----------------------------------------------------------------------------------------------------------------------------------|
278+
| `enable` | Generates default implementations in interfaces and includes bridge functions in subclasses and `DefaultImpls` classes. (Default) |
279+
| `no-compatibility` | Generates only default implementations in interfaces, skipping compatibility bridges and `DefaultImpls` classes. |
280+
| `disable` | Generates only compatibility bridges and `DefaultImpls` classes, skipping default methods. |
281+
272282
## Kotlin/JS compiler options
273283

274284
The Kotlin compiler for JS compiles Kotlin source files into JavaScript code.

0 commit comments

Comments
 (0)