HomePhorge

(PUP-514) Fix assignability of 0 min Tuples
b004be63914bUnpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

(PUP-514) Fix assignability of 0 min Tuples

The assignability logic didn't consider an empty Tuple (Tuple) to be assignable
to a Tuple of min size 0 (Tuple[Object, 0, default]). This prevented the
case of a Callable that represented with only varargs from being called
with no arguments (Callable[Object, 0, default], Tuple).

The mistake was that after the check that the sizes of the tuples were
compatible, it then used the *max* of the two tuple's type parameters to
determine if the two are compatible. However, only the list of types in
the right hand side tuple matter in determining assignability.

Details

Provenance
Andrew Parker <andy@puppetlabs.com>Authored on
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPUc98ee1e34b7c: (PUP-514) Clean up logic, remove dead code, improve naming.
Branches
Unknown
Tags
Unknown

Event Timeline

Andrew Parker <andy@puppetlabs.com> committed rPUb004be63914b: (PUP-514) Fix assignability of 0 min Tuples (authored by Andrew Parker <andy@puppetlabs.com>).Jun 12 2014, 11:46 PM