Details
-
Bug
-
Status: Accepted
-
Minor
-
Resolution: Unresolved
-
PUP 6.7.2
-
None
-
Needs Assessment
-
Needs Assessment
Description
Puppet Version: 6.7.2
Puppet Server Version: 6.5.0
OS Name/Version: Ubuntu 18.04.3 LTS
The following code does not parse:
type A = Variant[Pattern[/a/]]
|
type B = Variant[
|
A,
|
]
|
|
define x (
|
Variant[
|
A,
|
] $a,
|
) {
|
}
|
with the following error:
Error: Could not parse for environment production: Syntax error at ']' (file: ~/test.pp, line: 9, column: 3)
|
Desired Behavior:
The code should be parsed without error.
Actual Behavior:
The parsing the code with puppet parser validate ~/test.pp throws the above mentioned error.
The code does parse if the comma behind type A in the Variant block is removed. But this is a inconsistent behavior, because, as far as i know, all array like enumerations in puppet allow a comma after the last element. Also it works if the type is declared with the type keyword. And it works if the elements in the enumeration are not Variants themselves.