HomePhorge

(PUP-2794) Add support for Optional and Variant as Callable
3be4f49c680eUnpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

(PUP-2794) Add support for Optional and Variant as Callable

This adds support for a callable block to be specified using
Optional or Variant, as long as any actual type is a Callable.

I.e. in the Function API, it is possible to write:

required_block_param 'Variant[Callable[1,1], Callable[2,2]]', :block

If the function will invoke the block with either exactly one or
exactly two parameters (and when no type is specified, the type is the
internal Unit (don't care).

Details

Event Timeline

Henrik Lindberg <henrik.lindberg@cloudsmith.com> committed rPU3be4f49c680e: (PUP-2794) Add support for Optional and Variant as Callable (authored by Henrik Lindberg <henrik.lindberg@cloudsmith.com>).Jul 2 2014, 12:35 AM