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

Issue 2128243002: Fixes bug in scoping for generic methods. (Closed)

Created:
4 years, 5 months ago by eernst
Modified:
4 years, 5 months ago
Reviewers:
Johnni Winther
CC:
reviews_dartlang.org, floitsch
Base URL:
https://github.com/dart-lang/sdk.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Fixes bug in scoping for generic methods. The updates to tests/language/generic_local_functions_test.dart use a local function type argument in its return type, which had not been tested and did not work. After a bunch of attempts to change the order in which the resolution is performed, it suddenly turned out that the offending statement `visit(node.returnType)` in `ResolverVisitor.visitFunctionExpression` might be redundant! (.. a subsequent re-resolution in `ResolverVisitor.analyze` performs the same job, and uses the correct scope). So this CL simply removes that `visit..` statement, and the resulting `dart2js` passes all tests. Adresses issue https://github.com/dart-lang/sdk/issues/26805. R=johnniwinther@google.com Committed: https://github.com/dart-lang/sdk/commit/6942e0df631ee41ae96f330902c777a1248c5cb5

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -5 lines) Patch
M pkg/compiler/lib/src/resolution/members.dart View 1 chunk +0 lines, -1 line 0 comments Download
M pkg/compiler/lib/src/tree/unparser.dart View 1 chunk +1 line, -0 lines 0 comments Download
M tests/language/generic_local_functions_test.dart View 1 chunk +4 lines, -4 lines 0 comments Download

Messages

Total messages: 5 (2 generated)
eernst
It looks like local functions have had their return types double-checked for a while! So ...
4 years, 5 months ago (2016-07-07 13:13:00 UTC) #2
Johnni Winther
LGTM It was redundant!
4 years, 5 months ago (2016-07-08 07:38:26 UTC) #3
eernst
4 years, 5 months ago (2016-07-08 11:28:48 UTC) #5
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
6942e0df631ee41ae96f330902c777a1248c5cb5 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698