Chromium Code Reviews
DescriptionConsolidate the code that replaces a TypeParameter with its bound.
In the process, I fixed a bug where one version of this same lump of
code wasn't correct anymore now that you can have arbitrarily long
chains of type parameters.
DartType isn't maybe the ideal place for resolveToBound(). I wanted it
somewhere that:
1. Would be obvious enough that someone coming along later would
discover it instead of reinventing it again.
2. Had access to the various data it needs.
3. Wouldn't need a "is TypeParameterType" guard at every callsite
before it could be used.
I could put it on TypeProvider instead, since it needs access to Object,
but that felt arbitrary.
It could be a top level function, but then I don't think it would be
very discoverable.
R=brianwilkerson@google.com, jmesserly@google.com
Committed: https://github.com/dart-lang/sdk/commit/e19c6dd79d3edb0cf805c62d18cdb5e4ed3e4950
Patch Set 1 #
Total comments: 9
Patch Set 2 : Revise. #Patch Set 3 : Add unit tests. #
Messages
Total messages: 9 (2 generated)
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||