mirror of
https://github.com/dart-lang/sdk
synced 2024-10-14 12:30:03 +00:00
Call computeType rather than parseType
Change-Id: I4d67e8742997181775320b596443ea9dd78be60d Reviewed-on: https://dart-review.googlesource.com/56241 Reviewed-by: Brian Wilkerson <brianwilkerson@google.com> Commit-Queue: Dan Rubel <danrubel@google.com>
This commit is contained in:
parent
2c8c05f877
commit
3bdd173175
|
@ -43,7 +43,12 @@ class TryStatementTest extends PartialCodeTest {
|
|||
ParserErrorCode.EXPECTED_TOKEN
|
||||
],
|
||||
"try {} on _s_ {}",
|
||||
failing: allExceptEof),
|
||||
failing: [
|
||||
'block',
|
||||
'labeled',
|
||||
'localFunctionNonVoid',
|
||||
'localFunctionVoid'
|
||||
]),
|
||||
new TestDescriptor('on_identifier', 'try {} on A',
|
||||
[ParserErrorCode.EXPECTED_TOKEN], "try {} on A {}",
|
||||
failing: ['block']),
|
||||
|
|
|
@ -5609,7 +5609,7 @@ class Parser {
|
|||
if (identical(value, 'on')) {
|
||||
// 'on' type catchPart?
|
||||
onKeyword = token;
|
||||
lastConsumed = parseType(token);
|
||||
lastConsumed = computeType(token, true).ensureTypeNotVoid(token, this);
|
||||
token = lastConsumed.next;
|
||||
value = token.stringValue;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue