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

Issue 2535373003: Resolve type arguments to generic methods. (Closed)

Created:
4 years ago by Johnni Winther
Modified:
4 years ago
Reviewers:
eernst
CC:
reviews_dartlang.org
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Patch Set 1 #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+77 lines, -55 lines) Patch
M pkg/compiler/lib/src/apiimpl.dart View 1 chunk +1 line, -2 lines 0 comments Download
M pkg/compiler/lib/src/kernel/task.dart View 1 chunk +2 lines, -2 lines 0 comments Download
M pkg/compiler/lib/src/parser/class_element_parser.dart View 1 chunk +1 line, -1 line 0 comments Download
M pkg/compiler/lib/src/parser/diet_parser_task.dart View 1 chunk +2 lines, -2 lines 0 comments Download
M pkg/compiler/lib/src/parser/node_listener.dart View 3 chunks +38 lines, -23 lines 0 comments Download
M pkg/compiler/lib/src/parser/parser.dart View 1 chunk +1 line, -1 line 2 comments Download
M pkg/compiler/lib/src/parser/parser_task.dart View 1 chunk +3 lines, -1 line 0 comments Download
M pkg/compiler/lib/src/parser/partial_parser.dart View 1 chunk +1 line, -1 line 0 comments Download
M pkg/compiler/lib/src/resolution/members.dart View 1 chunk +2 lines, -0 lines 2 comments Download
M pkg/compiler/lib/src/tree/nodes.dart View 4 chunks +9 lines, -4 lines 0 comments Download
M pkg/compiler/lib/src/tree/unparser.dart View 1 chunk +1 line, -0 lines 1 comment Download
M pkg/compiler/lib/src/typechecker.dart View 1 chunk +1 line, -2 lines 0 comments Download
M tests/compiler/dart2js/enumset_test.dart View 1 chunk +1 line, -8 lines 0 comments Download
M tests/compiler/dart2js/generic_method_type_usage_test.dart View 2 chunks +9 lines, -1 line 0 comments Download
M tests/compiler/dart2js/kernel/assert_test.dart View 1 chunk +4 lines, -5 lines 0 comments Download
M tests/compiler/dart2js/partial_parser_test.dart View 1 chunk +1 line, -2 lines 0 comments Download

Messages

Total messages: 6 (2 generated)
Johnni Winther
4 years ago (2016-11-30 09:16:37 UTC) #2
eernst
LGTM! https://codereview.chromium.org/2535373003/diff/1/pkg/compiler/lib/src/parser/parser.dart File pkg/compiler/lib/src/parser/parser.dart (right): https://codereview.chromium.org/2535373003/diff/1/pkg/compiler/lib/src/parser/parser.dart#newcode1360 pkg/compiler/lib/src/parser/parser.dart:1360: assert(token != null); I tend to think `assert` ...
4 years ago (2016-11-30 10:39:01 UTC) #3
Johnni Winther
Committed patchset #1 (id:1) manually as 33303ffea5e0ad6b6fe5fdec2a71a2ca5e2f7b91 (presubmit successful).
4 years ago (2016-11-30 11:44:38 UTC) #5
Johnni Winther
4 years ago (2016-11-30 11:51:03 UTC) #6
Message was sent while issue was closed.
https://codereview.chromium.org/2535373003/diff/1/pkg/compiler/lib/src/parser...
File pkg/compiler/lib/src/parser/parser.dart (right):

https://codereview.chromium.org/2535373003/diff/1/pkg/compiler/lib/src/parser...
pkg/compiler/lib/src/parser/parser.dart:1360: assert(token != null);
On 2016/11/30 10:39:01, eernst wrote:
> I tend to think `assert` is a separate syntactic form rather than just another
> function invocation, so I'd prefer to have the space (just like `if (..)` and
> `while (..)`).
> 
> But I can see that the SDK has 9651 occurrences of `assert(` and 99
occurrences
> of `assert (`, so let's stick to the function call. ;)

Acknowledged.

https://codereview.chromium.org/2535373003/diff/1/pkg/compiler/lib/src/resolu...
File pkg/compiler/lib/src/resolution/members.dart (right):

https://codereview.chromium.org/2535373003/diff/1/pkg/compiler/lib/src/resolu...
pkg/compiler/lib/src/resolution/members.dart:3010:
visit(node.typeArgumentsNode);
On 2016/11/30 10:39:01, eernst wrote:
> I basically buy the argument that we can reject "meaningless" programs and
> accept "meaningful ones that violate constraints".
> 
> I suspect that developers will be confused (they are not likely to see that
> distinction spontaneously, and `dart2js` won't help them, it just emits
warnings
> about certain method invocation type arguments being non-types and accepts
> malboundedness silently).
> 
> Anyway, I think almost all developers will get their messages from the
analyzer,
> so we don't really have to worry about all those wrong programs, because they
> won't compile them before the analyzer is happy.
> 
> So we're good. ;-)

Acknowledged.

Powered by Google App Engine
This is Rietveld 408576698