DescriptionMake the kernel API for promoted type parameter bounds less error-prone.
I'm about to start introducing usages of TypeParameterType.bound, and
nearly all of the usage sites will need to fall back on
TypeParameter.bound if there is no bound stored in the
TypeParameterType. This CL places the fallback behavior in the
TypeParameterType.bound getter so that we won't have to duplicate it
at every usage site (and risk making mistakes). The few call sites
that don't want the fallback behavior (such as the one in
ast_to_binary.dart) can avoid it by referring to
TypeParameterType.promotedBound directly.
R=ahe@google.com
Committed: https://github.com/dart-lang/sdk/commit/6ac836fbb3cc495b28b17f6276ec4fa734bf3e4c
Patch Set 1 #
Messages
Total messages: 5 (2 generated)
|