问题描述
获取以下Kotlin代码的解析错误。 我正在使用Kotlin语法形式的ANTLR v4(https://github.com/antlr/grammars-v4/tree/master/kotlin/kotlin)
class BaseViewHelperTest {
@Test
@Throws(InterruptedException::class)
fun completetest() {
mConnectToGameLabUseCase.execute(object : DefaultCompletableObserver() {
override fun onComplete() {
super.onComplete()
unlock()
}
override fun onError(e: Throwable) {
super.onError(e)
failure()
}
})
lock()
}
}
错误详细信息:
line 12:12 no viable alternative at input '(object:DefaultCompletableObserver(){overridefunonComplete(){super.onComplete()unlock()}'
line 9:21 no viable alternative at input 'overridefun'
line 9:38 mismatched input '{' expecting {',',RPAREN}
line 14:12 mismatched input 'override' expecting {<EOF>,NL,';'}
以上语法需要进行哪些更改以支持此操作?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)