Feature #2818
case statements dont support undef
| Status: | Closed | Start: | 11/14/2009 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assigned to: | % Done: | 0% |
||
| Category: | language | |||
| Target version: | 2.6.0 | |||
| Affected version: | 0.25.1 | Branch: | tickets/master/2818 | |
| Keywords: | behaviourchange | |||
| Votes: | 0 |
Description
undef vars can be used in if-else statements
$foo1 = undef
if($foo1) {
$bar1 = "def"
} else {
$bar1 = "undef"
}
notice($bar1)
but not in a conditionals
$foo2 = undef
$bar2 = $foo2 ? {
undef => "not defined",
default => "defined"
}
warning $bar2
History
Updated by James Turnbull 9 months ago
- Category set to language
- Status changed from Unreviewed to Investigating
- Assigned to set to Brice Figureau
- Target version set to 2.6.0
Updated by Brice Figureau 9 months ago
Note: this is not a regression, 0.24.8 behaves the same.
Updated by Brice Figureau 9 months ago
See my patch in puppet-dev. The fix introduces a change of behavior which should be discussed.
Updated by Brice Figureau 9 months ago
- Status changed from Investigating to Ready for Testing
- Branch set to tickets/master/2818
Brice Figureau wrote:
See my patch in puppet-dev. The fix introduces a change of behavior which should be discussed.
The patch is also available in tickets/master/2818 in my github repository: http://github.com/masterzen/puppet/tree/tickets/master/2818
Updated by James Turnbull 8 months ago
- Status changed from Ready for Testing to Code Insufficient
From the discussion on the -dev list I am presuming this patch needs changes?
Updated by Brice Figureau 7 months ago
- Status changed from Code Insufficient to Ready for Checkin
- Assigned to changed from Brice Figureau to James Turnbull
Hi,
I’ve finished and rebased the code for Rowlf. It has been approved (about 2 weeks ago). Code is still in the tickets/master/2818 branch in my github repository: http://github.com/masterzen/puppet/tree/tickets/master/2818
Updated by James Turnbull 7 months ago
- Status changed from Ready for Checkin to Closed
- Keywords set to behaviourchange
Pushed in commit:“53869e99149be0f60b4e415d061a76ab5421eadb” in branch 0.25.x