Chromium Code Reviews
DescriptionAccess types safely in TypeResolverVisior.visitMethodDeclaration()
Previously, when attempting to figure out the type of the synthetic
field associated with a getter (or setter),
TypeResolverVisitor.visitMethodDeclaration() used the getters
FunctionTypeImpl.returnType (or FunctionTypeImpl.normalParameterTypes)
to extract the appropriate type. But those getters are only safe to
use after types have been fully constructed (because they may try to
perform type substitution). Fortunately, type substitution isn't
needed here, so we can simply use FunctionTypeImpl.baseReturnType (or
FunctionTypeImpl.baseParameters) instead.
Fixes #24539.
R=brianwilkerson@google.com, scheglov@google.com
Committed: https://github.com/dart-lang/sdk/commit/9af099fcdfd931a0064681f40c6d553ca88a439b
Patch Set 1 #
Messages
Total messages: 5 (1 generated)
|
||||||||||||||||||||||||||||