Files
kotlin/plugins/source-sections/source-sections-compiler/testData/sourceSectionsBasics.kts
Ilya Chernikov 4b430b49a7 Implement source sections compiler plugin
allows to compile only parts of the source files, denoted by top-level
"sections" (function with lambda param calls), but preserving original
file line/column numbers for easier diagnostics. Allow e.g. to compile
gradle "buildscript" section without preprocessing original file in
advance. See tests for examples.
2017-03-21 16:30:46 +01:00

23 lines
310 B
Kotlin
Vendored

println("should not be printed")
fun unlistedSectionName(body: () -> Unit): Unit = body()
let {
println("Hello, World!")
}
println("ignore here")
unlistedSectionName {
println("should not be printed too")
}
println("ignore here")
apply {
println("That's all, folks!")
}
println("ignore here")