Skip to content

Commit 13b65e4

Browse files
authored
update: adding information about experimental language compiler options (#5070)
* update: adding information about experimental language compiler options * implementing comments from Sarah
1 parent b546e95 commit 13b65e4

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

docs/topics/compiler-reference.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,34 @@ You can adjust warning reporting in your project by combining module-wide rules
199199

200200
If you have many warnings to exclude from the general rules, you can list them in a separate file using [`@argfile`](#argfile).
201201

202+
### -Xdata-flow-based-exhaustiveness
203+
<primary-label ref="experimental-general"/>
204+
205+
Enables data-flow–based exhaustiveness checks for `when` expressions.
206+
207+
### -Xallow-reified-type-in-catch
208+
<primary-label ref="experimental-general"/>
209+
210+
Enables support for reified `Throwable` type parameters in `catch` clauses of `inline` functions.
211+
212+
### Kotlin contract options
213+
<primary-label ref="experimental-general"/>
214+
215+
The following options enable experimental Kotlin contract features.
216+
217+
#### -Xallow-contracts-on-more-functions
218+
219+
Enables contracts in additional declarations, including property accessors, specific operator functions,
220+
and type assertions on generic types.
221+
222+
#### -Xallow-condition-implies-returns-contracts
223+
224+
Allows using the `returnsNotNull()` function in contracts to assume a non-null return value for specified conditions.
225+
226+
#### -Xallow-holdsin-contract
227+
228+
Allows using the `holdsIn` keyword in contracts to assume that a boolean condition is `true` inside a lambda.
229+
202230
## Kotlin/JVM compiler options
203231

204232
The Kotlin compiler for JVM compiles Kotlin source files into Java class files.

0 commit comments

Comments
 (0)