E4028#
This expression has a type which is not a struct.
Erroneous Example#
pub struct T {
a : Int
}
pub let a : Int = { a: 42 }
The example above tries to assign a struct of type T to a variable a of type Int,
which is not possible and gives the following error on line 2:
This expression has type Int, which is a Int type and not a struct.
Suggestion#
Make sure to use the correct type instead:
pub struct T {
a : Int
}
pub let a : T = { a: 42 }