Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/kotlin/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/csharp-4.0/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
idea在Kotlin项目中调用Scala varargs函数时类型不匹配_Scala_Kotlin_Intellij Idea_Variadic Functions - Fatal编程技术网

idea在Kotlin项目中调用Scala varargs函数时类型不匹配

idea在Kotlin项目中调用Scala varargs函数时类型不匹配,scala,kotlin,intellij-idea,variadic-functions,Scala,Kotlin,Intellij Idea,Variadic Functions,假设我在scala库中有一个函数foo(),名为 @varargs def foo(first: Kitty, alternatives: Kitty*): Kitty= KittyAdapter { import kitty.overlord.Rules._ (first +: alternatives).map(_.delegate).reduce(_ ~ _) } 当我在这样的kotlin项目中调用这个函数时 fun bar():Kitty = foo( scab

假设我在scala库中有一个函数foo(),名为

 @varargs def foo(first: Kitty, alternatives: Kitty*): Kitty= KittyAdapter {
    import kitty.overlord.Rules._

    (first +: alternatives).map(_.delegate).reduce(_ ~ _)
  }
当我在这样的kotlin项目中调用这个函数时

fun bar():Kitty = foo(
scab,
sbab,
blab
)
这个想法编写得很好,但intellisense显示了这一点

需要类型不匹配:Seq!,发现:基蒂


整段代码都变红了。

回答我自己的问题,Idea 2019.3.1和scala插件2019.3.23很好。

回答我自己的问题,Idea 2019.3.1和scala插件2019.3.23很好。

听起来像是/一定是这样,KT-32292正是我所处的困境,谢谢你的信息听起来像/一定是这样,KT-32292正是我所处的困境,谢谢你的信息