mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 15:53:37 +00:00
Writing a Jigsaw-modular Kotlin program which doesn't require
kotlin.stdlib doesn't make sense because it most likely will fail at
runtime, on access to anything from the standard library. Previously, we
checked that kotlin.stdlib was in the module graph, but that's not
enough, we should also check that the source module requires it.
'-Xallow-kotlin-package' can be used to disable the error.
Add a test checking that an indirect (transitive) dependency is also OK
(cherry picked from commit 0439abba46)
7 lines
254 B
Kotlin
Vendored
7 lines
254 B
Kotlin
Vendored
import kotlin.text.Regex
|
|
|
|
fun f1(): List<String?> = emptyList()
|
|
fun f2(): Array<Lazy<Unit>> = arrayOf()
|
|
fun f3(map: Map<Int, Regex>): Collection<Regex> =
|
|
map.filterNot { (key, entry) -> "$key".equals(entry.toString(), ignoreCase = true) }.values
|