Commit 41c0bb1
authored
Minor, move decodeDuration logic to a function reference (Kotlin#2550)
This is needed because once we enable indy lambdas by default
(KT-45375), `@SuppressAnimalSniffer` annotation stops working, because animalsnifferMain does not handle indy lambdas correctly, and the
`animalsnifferMain` task reports several errors about
`java.time.Duration` being used.
There are multiple ways to workaround this issue, for example we could
annotate the lambda with `@JvmSerializableLambda` or compile the whole
module with `-Xlambdas=class`, but I chose to use a simple function
reference instead, since we don't generate those via invokedynamic yet
(KT-45658), and it doesn't make the code any more difficult.1 parent 8a3ed23 commit 41c0bb1
File tree
1 file changed
+6
-4
lines changed- formats/hocon/src/main/kotlin/kotlinx/serialization/hocon
1 file changed
+6
-4
lines changedLines changed: 6 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
112 | 116 | | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
| 117 | + | |
| 118 | + | |
117 | 119 | | |
118 | 120 | | |
119 | 121 | | |
| |||
0 commit comments