Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1138)

Issue 1397193002: Access types safely in TypeResolverVisior.visitMethodDeclaration() (Closed)

Created:
5 years, 2 months ago by Paul Berry
Modified:
5 years, 2 months ago
CC:
reviews_dartlang.org
Base URL:
git@github.com:dart-lang/sdk.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Access 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+30 lines, -4 lines) Patch
M pkg/analyzer/lib/src/generated/resolver.dart View 1 chunk +4 lines, -4 lines 0 comments Download
M pkg/analyzer/test/generated/non_error_resolver_test.dart View 1 chunk +26 lines, -0 lines 0 comments Download

Messages

Total messages: 5 (1 generated)
Paul Berry
5 years, 2 months ago (2015-10-09 20:47:01 UTC) #2
scheglov
LGTM
5 years, 2 months ago (2015-10-09 21:11:50 UTC) #3
Brian Wilkerson
LGTM
5 years, 2 months ago (2015-10-09 21:15:06 UTC) #4
Paul Berry
5 years, 2 months ago (2015-10-09 21:21:16 UTC) #5
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
9af099fcdfd931a0064681f40c6d553ca88a439b (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698