E4055

E4055#

Compiler diagnostic name: field_duplicate.

Field is already declared. Within one struct declaration, each field name must be unique because field access, construction, and update syntax all identify a field by name.

Erroneous example#

///|
struct A {
  a : Int
  a : Double
}

Suggestion#

Rename the field to a different name.

///|
priv struct  {
   : 
   : 
}

///|
test {
  let  :  = { : 1, : 2.0 }
  (., ="1")
  (., ="2")
}