Jira (PUP-7458) Unclear meaning of default in a array in a case statement

2017-04-22 Thread Henrik Lindberg (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Henrik Lindberg commented on  PUP-7458 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: Unclear meaning of default in a array in a case statement  
 
 
 
 
 
 
 
 
 
 
Yes, they are equivalent. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-7458) Unclear meaning of default in a array in a case statement

2017-04-20 Thread Francois Lafont (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Francois Lafont commented on  PUP-7458 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: Unclear meaning of default in a array in a case statement  
 
 
 
 
 
 
 
 
 
 
Ah ok, sorry for the noise. 
So, if I understand well, the two case statements below are strictly equivalent, ie default ie strictly equivalent to Any in this context. 
Is it correct? 
 
 
 
 
 
 
case [ 1234, 'ab' ] { 
 
 
 
 
  [default, String]: { 1 } 
 
 
 
 
  [Integer, String]: { 2 } 
 
 
 
 
} 
 
 
 
 
  
 
 
 
 
case [ 1234, 'ab' ] { 
 
 
 
 
  [Any, String]: { 1 } # <= Any instead of default 
 
 
 
 
  [Integer, String]: { 2 } 
 
 
 
 
}
 
 
 
 
 
 
 
 
 
 
 
 

Jira (PUP-7458) Unclear meaning of default in a array in a case statement

2017-04-20 Thread Henrik Lindberg (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Henrik Lindberg commented on  PUP-7458 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: Unclear meaning of default in a array in a case statement  
 
 
 
 
 
 
 
 
 
 
A case proposition of default is specified to be picked last. When default appears as a literal value anywhere else (nested in arrays or hashes) it is simply a "wildcard" value that matches against anything. When used this way, the order of the options/propositions matter - as shown by the example where the first option matches. 
The specification of the Case _expression_ can be read here https://github.com/puppetlabs/puppet-specifications/blob/master/language/expressions.md#case-_expression_ 
Closing this as "won't do" as it works as specified. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at https://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (PUP-7458) Unclear meaning of default in a array in a case statement

2017-04-19 Thread Francois Lafont (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Francois Lafont created an issue 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 Puppet /  PUP-7458 
 
 
 
  Unclear meaning of default in a array in a case statement  
 
 
 
 
 
 
 
 
 

Issue Type:
 
  Bug 
 
 
 

Affects Versions:
 

 PUP 4.10.0 
 
 
 

Assignee:
 

 Unassigned 
 
 
 

Components:
 

 Language 
 
 
 

Created:
 

 2017/04/19 10:03 AM 
 
 
 

Priority:
 
  Normal 
 
 
 

Reporter:
 
 Francois Lafont 
 
 
 
 
 
 
 
 
 
 
Hi, 
Here is the puppet code: 
 
 
 
 
 
 
notice ( 
 
 
 
 
  case 1234 {