Expecting Member Declaration

▼魔方 西西 提交于 2019-12-12 04:42:35

问题


I am trying to build a kotlin file (Corda) but running into the following error:

e: /Users/pro/Documents/Code/Corda/Tutorials/Kotlin/cordapp-template-kotlin/src/main/kotlin/com/template/App.kt: (59, 5): Expecting member declaration e: /Users/pro/Documents/Code/Corda/Tutorials/Kotlin/cordapp-template-kotlin/src/main/kotlin/com/template/App.kt: (59, 11): Expecting member declaration e: /Users/pro/Documents/Code/Corda/Tutorials/Kotlin/cordapp-template-kotlin/src/main/kotlin/com/template/App.kt: (59, 17): Expecting member declaration e: /Users/pro/Documents/Code/Corda/Tutorials/Kotlin/cordapp-template-kotlin/src/main/kotlin/com/template/App.kt: (59, 19): Expecting member declaration

Here is a snippet of line 59:

 // A transaction is considered valid if the verify() function of the contract of each of the transaction's input
    // and output states does not throw an exception.

    // Our Create Command
    Class Create: CommandData //Line 59

I am unsure of how to debug this and will appreciate any pointers on this


回答1:


As zsmb13 says, the class keyword should have a lower-case c (see https://kotlinlang.org/docs/reference/classes.html).



来源:https://stackoverflow.com/questions/46758820/expecting-member-declaration

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!