Jira (PUP-6022) Typing local variables does not work - results in Error: This Type-Name has no effect

4 views
Skip to first unread message

Henrik Lindberg (JIRA)

unread,
Mar 8, 2016, 8:59:03 PM3/8/16
to puppe...@googlegroups.com
Henrik Lindberg updated an issue
 
Puppet / Improvement PUP-6022
Typing local variables does not work - results in Error: This Type-Name has no effect
Change By: Henrik Lindberg
Summary: Typing local variables does not work -    results in Error: This Type-Name has no effect
Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.12#64027-sha1:e3691cc)
Atlassian logo

Greg Larkin (JIRA)

unread,
Mar 8, 2016, 10:33:03 PM3/8/16
to puppe...@googlegroups.com
Greg Larkin commented on Improvement PUP-6022
 
Re: Typing local variables does not work - results in Error: This Type-Name has no effect

Thank you very much for the thorough explanation, Henrik Lindberg! I missed this key portion of the documentation where the use cases for data types are listed: https://docs.puppetlabs.com/puppet/latest/reference/lang_data_type.html#usage

Henrik Lindberg (JIRA)

unread,
Mar 9, 2016, 4:44:02 AM3/9/16
to puppe...@googlegroups.com

No problem. I did write it up a bit longer than usual because this sounded like a corner others would paint themselves into as well and it is not unreasonable at all, given how you do typing in other programming languages that an expression like String $x = something would type the variable $x. I did change the title to make it more googlable (is that even a word?).

john (JIRA)

unread,
Sep 13, 2019, 6:57:03 AM9/13/19
to puppe...@googlegroups.com
john commented on Improvement PUP-6022

I came across this issue while investigating a different problem and just wanted to clarify.  first, thanks Henrik Lindberg for the great explanation however i believe the following needs clarifying

Puppet 4.x does not support typing variables.

Type aliases where introduced in puppet 4.4 so i think this should read "Puppet < 4.4.0 does not support typing variables.

This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Atlassian logo

Henrik Lindberg (JIRA)

unread,
Sep 13, 2019, 1:42:03 PM9/13/19
to puppe...@googlegroups.com

@john Not quite - typing variables have never been supported - parameters can be typed though (as explained above).

john (JIRA)

unread,
Sep 19, 2019, 5:22:06 AM9/19/19
to puppe...@googlegroups.com
john commented on Improvement PUP-6022

Henrik Lindberg thanks i hadn't noticed that the variable in `vartest::params` was not a parameter

Reply all
Reply to author
Forward
0 new messages