小编a.r*_*.r.的帖子

Kotlin编译错误:使用提供的参数无法调用以下任何函数

我正在尝试学习Kotlin,并在kotlin中创建了一个简单的类,在其构造函数中使用两个int,然后添加它们.这些int可以为null.

I am receiving compilation error as:

None of the following functions can be called with the arguments supplied: 
public final operator fun plus(other: Byte): Int defined in kotlin.Int
public final operator fun plus(other: Double): Double defined in kotlin.Int
public final operator fun plus(other: Float): Float defined in kotlin.Int
public final operator fun plus(other: Int): Int defined in kotlin.Int
public final operator fun plus(other: Long): Long defined in kotlin.Int
public final operator fun plus(other: Short): Int defined in kotlin.Int
Run Code Online (Sandbox Code Playgroud)

我的号码加法器类如下: …

int kotlin

11
推荐指数
1
解决办法
2万
查看次数

标签 统计

int ×1

kotlin ×1