Issue #4685 has been updated by Paul Berry.

Status changed from Accepted to Ready for Testing
% Done changed from 0 to 100
Branch set to http://github.com/stereotype441/puppet/tree/ticket/next/4685

This bug happened because ASTArray#evaluate() was responsible for checking 
whether the user had tried to declare a class, define, or node in a prohibited 
location.  So if the erroneous code wasn't evaluated, no error would be 
generated.

I've moved the checking into the parser, so that errors are always evaluated.
----------------------------------------
Bug #4685: Classes, defines, and nodes allowed inside of non-evaluated 
conditionals
http://projects.puppetlabs.com/issues/4685

Author: Paul Berry
Status: Ready for Testing
Priority: Normal
Assignee: Paul Berry
Category: parser
Target version: Statler
Affected version: development
Keywords: 
Branch: http://github.com/stereotype441/puppet/tree/ticket/next/4685


The fix for issue #4522 introduced an error message if the user tries to 
declare a class, node, or define inside of a conditional construct.  However, 
the error is only raised if the conditional code is actually evaluated.  For 
example, this code generates an error (as expected):
<pre>
if true {
  class foo { }
}
</pre>
but this code does not:
<pre>
if false {
  class bar { }
}
</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.

Reply via email to