mirror of
https://github.com/dart-lang/sdk
synced 2024-10-03 06:21:30 +00:00
Call computeTypeVar rather than parseTypeArguments when parsing expressions
Change-Id: I4423d1fc4941d7e7fc93c02d89ab81ade46ecf1d Reviewed-on: https://dart-review.googlesource.com/52720 Commit-Queue: Dan Rubel <danrubel@google.com> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
This commit is contained in:
parent
8f6c6c2a8e
commit
1d8620044a
|
@ -86,10 +86,13 @@ import 'type_continuation.dart' show TypeContinuation;
|
|||
import 'type_info.dart'
|
||||
show
|
||||
TypeInfo,
|
||||
TypeParamOrArgInfo,
|
||||
computeType,
|
||||
computeTypeParamOrArg,
|
||||
isGeneralizedFunctionType,
|
||||
isValidTypeReference,
|
||||
noType;
|
||||
noType,
|
||||
noTypeParamOrArg;
|
||||
|
||||
import 'type_info_impl.dart' show skipTypeVariables;
|
||||
|
||||
|
@ -4112,10 +4115,12 @@ class Parser {
|
|||
TokenType type = next.type;
|
||||
int tokenLevel = type.precedence;
|
||||
Token typeArguments;
|
||||
if (isValidMethodTypeArguments(next)) {
|
||||
// For example a(b)<T>(c), where token is '<'.
|
||||
TypeParamOrArgInfo typeArg = computeTypeParamOrArg(token);
|
||||
if (typeArg != noTypeParamOrArg &&
|
||||
optional('(', typeArg.skip(token).next)) {
|
||||
// For example a(b)<T>(c), where token is before '<'.
|
||||
typeArguments = next;
|
||||
token = parseTypeArgumentsOpt(token);
|
||||
token = typeArg.parseArguments(token, this);
|
||||
next = token.next;
|
||||
assert(optional('(', next));
|
||||
type = next.type;
|
||||
|
|
Loading…
Reference in a new issue