E3800#
Expecting a newline or ; here, but encountered another delimiter.
Constructors in enum definition, fields in struct definition, and
constructors in error type type! definition, should be separated by a newline
or a ;. It is so common for AI to generate code with a wrong delimiter ,
that we specifically catch this error to help you and AI fix it.
Erroneous example#
///|
enum V {
// Error: Expecting a newline or `;` here, but encountered `,`.
A,
}
///|
struct S {
// Error: Expecting a newline or `;` here, but encountered `,`.
a : Int,
}
///|
suberror E {
// Error: Expecting a newline or `;` here, but encountered `,`.
A,
}
Suggestion#
Replace , with a newline or ; as appropriate. We suggest using a newline
since it conforms to the MoonBit style suggested by the MoonBit formatter.
///|
enum V {
A
}
///|
struct S {
a : Int
}
///|
suberror E {
A
}