Visit default argument values for lambdas in DeclarationBuilder

Authored by flherne on Sep 13 2017, 12:39 AM.

Description

Visit default argument values for lambdas in DeclarationBuilder

Due to an omission in a39fefad "Avoid creating duplicate declarations
for lambda parameters.", these weren't visited.

This wasn't noticed because no test cared whether a lambda's default
values were visited in DeclarationBuilder.

d42f1308 opens the context belonging to lambdas (created in
DeclarationBuilder), and there happens to be a test where a lambda
is a default argument value of another lambda.
Since this inner lambda was
never visited in DeclarationBuilder, contextForNode() returned null
leading to a crash.

Note: visiting annotations is unnecessary, because it's impossible for
lambda arguments to have them.

Add another test that would have found this bug earlier.

Details

Committed
flherneSep 13 2017, 12:56 AM
Parents
R53:d42f13080fba: Open context for lambdas in ContextBuilder
Branches
Unknown
Tags
Unknown