If you omit the explicitly initializer, it generates a memberwise initializer,
middle happens to have a default value), but because
private, so is this initializer.
As the documentation says:
The default memberwise initializer for a structure type is considered private if any of the structure’s stored properties are private. Likewise, if any of the structure’s stored properties are file private, the initializer is file private. Otherwise, the initializer has an access level of internal.
middle wasn’t marked as a variable that could be set (either by making it a constant with
private let or setting only the setter to be private (with
private(set) var, then only
init(first:last:) would be created on your behalf.
CLICK HERE to find out more related problems solutions.