E4040#
The type constructor expects a different number of arguments than provided.
Erroneous Example#
let a : Option = Some(3)
The example above tries to create an instance of the Option
type.
The Option
type is a generic type that expects a single type argument,
but the example does not provide any type arguments,
giving the following error on line 1:
The type constructor Option expects 1 argument(s), but is here given 0 argument(s).
Suggestion#
Make sure to provide the correct number of type arguments:
let a : Option[Int] = Some(3)