提交 25c80443 编写于 作者: A Alex Tkachman

test for KT-606

上级 08c074c5
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"
}
\ No newline at end of file
......@@ -76,4 +76,8 @@ public class ExtensionFunctionsTest extends CodegenTestCase {
createEnvironmentWithMockJdk(CompilerSpecialMode.BUILTINS);
blackBoxFile("extensionFunctions/nested2.kt");
}
public void testKt606() throws Exception {
createEnvironmentWithMockJdk(CompilerSpecialMode.BUILTINS);
blackBoxFile("regressions/kt606.kt");
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册