test for KT-606
This commit is contained in:
@@ -0,0 +1,25 @@
|
|||||||
|
class StandardPipelineFactory(val config : ChannelPipeline.() -> Unit) : ChannelPipelineFactory {
|
||||||
|
override fun getPipeline() : ChannelPipeline {
|
||||||
|
val pipeline : ChannelPipeline = DefaultChannelPipeline()
|
||||||
|
pipeline.config()
|
||||||
|
return pipeline
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
trait ChannelPipeline {
|
||||||
|
fun print(any: Any)
|
||||||
|
}
|
||||||
|
|
||||||
|
class DefaultChannelPipeline : ChannelPipeline {
|
||||||
|
override fun print(any: Any) = System.out?.println(any)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
trait ChannelPipelineFactory {
|
||||||
|
fun getPipeline() : ChannelPipeline
|
||||||
|
}
|
||||||
|
|
||||||
|
fun box() : String {
|
||||||
|
StandardPipelineFactory({ print("OK") }).getPipeline()
|
||||||
|
return "OK"
|
||||||
|
}
|
||||||
@@ -76,4 +76,8 @@ public class ExtensionFunctionsTest extends CodegenTestCase {
|
|||||||
createEnvironmentWithMockJdk(CompilerSpecialMode.BUILTINS);
|
createEnvironmentWithMockJdk(CompilerSpecialMode.BUILTINS);
|
||||||
blackBoxFile("extensionFunctions/nested2.kt");
|
blackBoxFile("extensionFunctions/nested2.kt");
|
||||||
}
|
}
|
||||||
|
public void testKt606() throws Exception {
|
||||||
|
createEnvironmentWithMockJdk(CompilerSpecialMode.BUILTINS);
|
||||||
|
blackBoxFile("regressions/kt606.kt");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user