On 2014-10-10 16:27, Henrik Lindberg wrote:
Thanks Daniele, excellent feedback !

More comments below...

On 2014-10-10 9:06, Daniele Sluijters wrote:
So this should also work:

class test (
   Optional[Numeric] $number = undef,
) {}

include test

However, it does not:
Error: Expected parameter 'number' of 'Class[Test]' to have type
Optional[Numeric], got Runtime[ruby, Symbol] on node nvc2542.

I tried to change that to Variant[Numeric, Undef], even though that's
exactly what Optional is defined as, but no dice either.. This feels
like a bug to me, I'm hoping Henrik or Andy can shed some light on the
situation.

Ah - you found a bug. Please file a ticket. We seem to have been a bit too 
aggressive in removing the use of :undef.

Until it has been fixed, you could try using a Runtime[ruby, Symbol] as the 
type of undef in that particular situation.

Perhaps related to (or same as) this issue?

https://tickets.puppetlabs.com/browse/PUP-3201

- thomas

--
You received this message because you are subscribed to the Google Groups "Puppet 
Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-dev/5437F0F2.4060502%40puppetlabs.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to