Closed
Description
Describe the Bug
Consider the following manifests:
class test (
String $s = '',
Custom::Type $t,
) {
}
class test (
String $s = '',
Optional[Boolean] $t,
) {
}
Currently puppet-lint does not recognize it as bad, because
- It considers parameters of type
Optional[something]
optional - this never was the definition of optional parameters in the Puppet docs. If you read docs thoroughly, you'll find out that optional parameters are no more than parameters with default values, whereasOptional
type just allows usingundef
as variable value (and does not make it default value for parameter automatically!). - It does not parse custom types as variable types, and effectively it just ignores such params.
One more thing - anchor in doc URL changed a bit (from #display-order-of-parameters
to #params-display-order
).
I've prepared a fix for this misbehavior.