mirror of
https://github.com/dart-lang/sdk
synced 2024-10-03 09:10:10 +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'
|
import 'type_info.dart'
|
||||||
show
|
show
|
||||||
TypeInfo,
|
TypeInfo,
|
||||||
|
TypeParamOrArgInfo,
|
||||||
computeType,
|
computeType,
|
||||||
|
computeTypeParamOrArg,
|
||||||
isGeneralizedFunctionType,
|
isGeneralizedFunctionType,
|
||||||
isValidTypeReference,
|
isValidTypeReference,
|
||||||
noType;
|
noType,
|
||||||
|
noTypeParamOrArg;
|
||||||
|
|
||||||
import 'type_info_impl.dart' show skipTypeVariables;
|
import 'type_info_impl.dart' show skipTypeVariables;
|
||||||
|
|
||||||
|
@ -4112,10 +4115,12 @@ class Parser {
|
||||||
TokenType type = next.type;
|
TokenType type = next.type;
|
||||||
int tokenLevel = type.precedence;
|
int tokenLevel = type.precedence;
|
||||||
Token typeArguments;
|
Token typeArguments;
|
||||||
if (isValidMethodTypeArguments(next)) {
|
TypeParamOrArgInfo typeArg = computeTypeParamOrArg(token);
|
||||||
// For example a(b)<T>(c), where token is '<'.
|
if (typeArg != noTypeParamOrArg &&
|
||||||
|
optional('(', typeArg.skip(token).next)) {
|
||||||
|
// For example a(b)<T>(c), where token is before '<'.
|
||||||
typeArguments = next;
|
typeArguments = next;
|
||||||
token = parseTypeArgumentsOpt(token);
|
token = typeArg.parseArguments(token, this);
|
||||||
next = token.next;
|
next = token.next;
|
||||||
assert(optional('(', next));
|
assert(optional('(', next));
|
||||||
type = next.type;
|
type = next.type;
|
||||||
|
|
Loading…
Reference in a new issue