HomePhorge

(PUP-2287) Fix lambda param with default is always choosen
c8b9962a848cUnpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

(PUP-2287) Fix lambda param with default is always choosen

This fixes the problem that a lambda parameter with a default always
was choosen even if a value was given for the parameter.

The expected behavior for function calls is that only truly missing (non
given) arguments are subjects to default value replacement, not if a
value is nil or undef. (This because functions are call by position, and
not call by name as for defines and classes). Thus all nil/undef values
are treated as any other value.

One test for the map function relied on the now fixed bug and it has
been marked pending, as it should be updated once the map function has
been transitioned to the new function API. (Where undef is not
transformed to empty string).

Details

Provenance
Henrik Lindberg <henrik.lindberg@cloudsmith.com>Authored on
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPU10a249f3f3b8: (maint) Fix return type warnings in Pops YARD docs
Branches
Unknown
Tags
Unknown

Event Timeline

Henrik Lindberg <henrik.lindberg@cloudsmith.com> committed rPUc8b9962a848c: (PUP-2287) Fix lambda param with default is always choosen (authored by Henrik Lindberg <henrik.lindberg@cloudsmith.com>).Apr 27 2014, 2:19 AM