Expecting Member Declaration

2019-08-23 10:37发布

问题:

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).



标签: kotlin corda