Error is:
error build: Command CompileSwift failed with a nonzero exit code
Code:
I have changed Struct type to Class type.
class ViewModel: Identifiable {
enum Error: Swift.Error {
case missingIdentifier
case missingChildren
case missingKey
case missingValue
case missingMessage
case missingOperator
}
let id = UUID()
class Element: Identifiable {
let id: String
let pointer: String?
let type: String
init(){
}
}
}
When I add class keyword to ViewModel working fine.
At same time if I added class to Element I am getting error.
error build: Command CompileSwift failed with a nonzero exit code