Issue #18672 has been reported by Andrew Parker. ---------------------------------------- Bug #18672: Cannot use empty hash literal in case statement https://projects.puppetlabs.com/issues/18672
Author: Andrew Parker Status: Accepted Priority: Normal Assignee: Category: language Target version: Affected Puppet version: Keywords: language parser Branch: As reported by Peter Bauer on the puppet-dev mailing list (<https://groups.google.com/forum/#!msg/puppet-dev/bYF1XMKPZ2M/nGNl_-5K1nEJ>), the following code will produce a parse error: <pre> $boole = true $testvar = $boole ? { true => {}, default => { hans => franz }, } </pre> The error: <pre> Could not parse for environment production: Syntax error at '{'; expected '}' at /tmp/test.pp:3 </pre> An even simpler example is: <pre> > puppet apply -e "notify(true ? { true => {} })" Error: Could not parse for environment production: Syntax error at '{'; expected '}' at line 1 on node aparker.corp.puppetlabs.net Error: Could not parse for environment production: Syntax error at '{'; expected '}' at line 1 on node aparker.corp.puppetlabs.net </pre> -- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://projects.puppetlabs.com/my/account -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/puppet-bugs?hl=en.
