Commit Graph

3034 Commits

Author SHA1 Message Date
Dan Rubel aa6945d5e9 First cut basic mixin declaration parsing support
... with parser recovery added in subsequent CLs.

Change-Id: I7a73e8e2a4dee961920fe9854bcd108bb1041b20
Reviewed-on: https://dart-review.googlesource.com/70882
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-08-24 21:58:55 +00:00
Sam Rawlins ff3908d6df Implement INVALID_SEALED_ANNOTATION analyzer Hint
This follows the pattern of other meta-annotations, when it comes to the AST:

* Element gains a new `hasSealed` getter. Many overrides.
* ElementAnnotation gains a new `isSealed` getter.

Bug: https://github.com/dart-lang/sdk/issues/34232
Change-Id: If8ae8e16b500125cb3b92b3cf83d46de6ca6ee23
Reviewed-on: https://dart-review.googlesource.com/71227
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-08-23 22:03:22 +00:00
Konstantin Shcheglov 955ca3ef87 Use SUPER_AS_EXPRESSION for SuperAsIdentifier.
Change-Id: I7bcbcc51739f01532f4723cf39c25a620f77f8b0
Reviewed-on: https://dart-review.googlesource.com/71364
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2018-08-23 21:48:27 +00:00
Konstantin Shcheglov 19a17e66fd Fix constant evalutation for == and != when left or right is null.
Change-Id: Iefa0890b57a9ba01675ce80c81fd3a73511f8c82
Reviewed-on: https://dart-review.googlesource.com/71340
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-08-23 18:18:51 +00:00
Brian Wilkerson 4212a46dab Add failing tests for handling of comment refs by fasta parser
Change-Id: I02bfbf2354ccf49bf6c3ea4968bb916f06b34c07
Reviewed-on: https://dart-review.googlesource.com/71320
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-08-23 17:11:47 +00:00
Konstantin Shcheglov 7e39d07916 Resolve namespace combinators.
R=brianwilkerson@google.com, paulberry@google.com

Bug: https://github.com/dart-lang/sdk/issues/33636
Change-Id: I4f16eec2dcb5805663c0118d221f8ad8710cf3f8
Reviewed-on: https://dart-review.googlesource.com/71220
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-08-23 16:08:45 +00:00
Daniel Hillerström 23e379d0aa Checks whether an interface is implemented multiple times.
It is a compile-time error if an interface appears multiple times
across the extends and implements clauses.

This CL implements a check to detect the aforementioned case. A
previous commit implemented this by expanding and refactoring the
restricted super types check in source_loader.dart
(c.f. checkSemantics method). The restricted super types check decides
whether a type is allowed to appear in an 'extends', 'implements', or
'with' clause. However, it turned out it may have sat too early in the
compilation pipeline as it failed to detect the following case

   class A implements Object {}

I decided that it was somewhat suboptimal to implement a special case
for "Object". Therefore I have moved the check to a later stage in the
pipeline, where classes without a super class have had the Object
class injected as their default super class. The check is now
implemented in kernel_class_builder.dart (c.f. checkSupertypes
method).

Closes https://github.com/dart-lang/sdk/issues/34193

Change-Id: Ie7153c896337b589118cac4b80e9df8ea5a09daa
Reviewed-on: https://dart-review.googlesource.com/70864
Commit-Queue: Daniel Hillerström <hillerstrom@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2018-08-23 14:36:40 +00:00
Brian Wilkerson b8ee603eb2 Deprecate the EMPTY_LIST constants in analyzer
Change-Id: I4c85c8c21207c86003cdb47d499ae9a934606889
Reviewed-on: https://dart-review.googlesource.com/71234
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-08-23 14:32:20 +00:00
Konstantin Shcheglov cf1cd3eba0 Resolve metadata for part-of directives.
R=brianwilkerson@google.com, paulberry@google.com

Bug: https://github.com/dart-lang/sdk/issues/33795
Change-Id: Ie2eac3694d2eacbb6619abb47cf9630555a21939
Reviewed-on: https://dart-review.googlesource.com/71186
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-08-22 19:00:13 +00:00
danrubel cd970b0927 Parser refactoring in preparation for mixin declaration support
This is a bunch of renames and cleanup in preparation for
my next CL with basic mixin declaration support.

Rename listener events:
* handleClassImplements to handleClassOrMixinImplements
* beginClassBody to beginClassOrMixinBody
* endClassBody to endClassOrMixinBody

Rename parser methods:
* parseClassMember to parseClassOrMixinMember
* parseClassBody to parseClassOrMixinBody
* skipClassBody to skipClassOrMixinBody

Also:
* Change test expect from "ClassBody" to "ClassOrMixinBody"
* Rename message ExpectedClassBody to ExpectedClassOrMixinBody
* Update text of MISSING_CLASS_BODY to include mixin
* Rename IdentifierContext.classOrNamedMixinDeclaration to classOrMixinDeclaration
Change-Id: Iaa554cc859e1e665475c0eb544895a311c06395a
Reviewed-on: https://dart-review.googlesource.com/70881
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-08-22 17:57:09 +00:00
Konstantin Shcheglov 5b9a42de29 Store code ranges for formal parameters.
Change-Id: I022e5140869c7007c28109a4dfda3914b34c4725
Reviewed-on: https://dart-review.googlesource.com/71184
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-08-22 17:40:58 +00:00
Aske Simon Christensen a4b3009ca5 Require super initializer to be at the end of the initializer list.
Drops code to handle special evaluation order rules for super
initializer before the end.

Initializer check code now also recovers from initializer errors.

Fixes https://github.com/dart-lang/sdk/issues/33101

Change-Id: I1024853bfd3acfef42630bdc2fc47782746b07c0
Reviewed-on: https://dart-review.googlesource.com/68060
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2018-08-22 10:43:08 +00:00
Daniel Hillerström 5780deb18a Signal a compile-time error when a type variable name conflicts with a setter name.
Specification disallow name conflicts between
  - type variables and class names
  - type variables and getter names
  - type variables and member names

Although not present in current specification, the language team confirms that
it is also supposed to be a compile-time error if there is conflict with a setter.

Closes https://github.com/dart-lang/sdk/issues/33827

Bug:
Change-Id: Ia25bc91c3287f93ae43faae121a1f9d81b179c6b
Reviewed-on: https://dart-review.googlesource.com/70500
Commit-Queue: Daniel Hillerström <hillerstrom@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2018-08-22 06:55:22 +00:00
Brian Wilkerson 8b125b55d0 Add an AST structure for the new mix-in support
Change-Id: I3d8890edf26eeb19eaaab9c27772e2c37c10e629
Reviewed-on: https://dart-review.googlesource.com/70141
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
2018-08-21 16:39:41 +00:00
Kevin Millikin 2a36502b02 Squelch some false warnings for disallowed uses of void
The rules for void are changed to allow uses of void where we
previously had a warning, such as the case of assignment to a
variable of type void or passing as a parameter of type void.

Change-Id: I1c1513b0000fa1c8eedbe2645fab503b28024fa3
Reviewed-on: https://dart-review.googlesource.com/70265
Reviewed-by: Daniel Hillerström <hillerstrom@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Kevin Millikin <kmillikin@google.com>
2018-08-21 09:48:44 +00:00
Mike Fairhurst 222ac2498a Revert "Fix #33415 no error for awaiting a void expression."
This reverts commit 9727a4a4ef.

Reason for revert: Internal breakage; needs to be landed behind a flag.

Original change's description:
> Fix #33415 no error for awaiting a void expression.
>
> Bug:  33415
> Change-Id: I4d4e81fef79a5bc5162e37ab07a8fe99e50c8dfc
> Reviewed-on: https://dart-review.googlesource.com/60522
> Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>

TBR=brianwilkerson@google.com,mfairhurst@google.com


Bug: 33415
Change-Id: I66e1bc58bc0966a2348804dbdef6f5901b6aaf55
Reviewed-on: https://dart-review.googlesource.com/67100
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-08-17 23:48:46 +00:00
danrubel 3987cd4616 Update parser tests to use new scanner
Change-Id: Ia46e2d85acfcd21d88ee97ede2d9ed66620ec618
Reviewed-on: https://dart-review.googlesource.com/70520
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-08-17 16:45:02 +00:00
Aske Simon Christensen f8a96b88e9 It is an error if a final field is not initialized.
Bug: https://github.com/dart-lang/sdk/issues/33022

This commit adds an error when a final field is not initialized at all
(and there is at least one generative constructor). A later commit
will add an error for the case where a field is initialized by some,
but not all, generative constructors.

A number of classes in the Dart2js and DDC support libraries use
uninitialized final fields to indicate getters in the corresponding
native classes. This commit adds a temporary whitelist for the
affected files, which can be removed when the fields have been
replaced by external getters.

This is tracked by https://github.com/dart-lang/sdk/issues/33762

Change-Id: I6b5cee230c7cd5554da2b61da7ebddb6b0b9396e
Reviewed-on: https://dart-review.googlesource.com/63781
Reviewed-by: Daniel Hillerström <hillerstrom@google.com>
2018-08-17 12:37:52 +00:00
Brian Wilkerson d772f40084 Add dummy test to prevent test failure from running no tests
Change-Id: I9379795edc2b84071a26447d4f5db1908527f17e
Reviewed-on: https://dart-review.googlesource.com/70420
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-08-16 23:41:11 +00:00
Brian Wilkerson d98e4cc2a9 Support parseArguments in the compatibility wrapper around the fasta parser
Change-Id: Iefb7a20f8bd6571bb021dea33454933c6962330f
Reviewed-on: https://dart-review.googlesource.com/70380
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
2018-08-16 21:25:57 +00:00
Daniel Hillerström 0db6545b51 Illegal return type check for functions marked async* or sync*.
Extends the illegal return type check for async functions to cover
illegal return types for functions marked async* or sync* as well.

Adds new error messages for illegal return types of functions marked
async, async*, and sync*. These error messages conform with those
produced by the analyzer.

Closes https://github.com/dart-lang/sdk/issues/33068

Bug: www.dartbug.com/33068
Change-Id: I6d8690537139d3d094a4e295fcac9de4f4a7f0af
Reviewed-on: https://dart-review.googlesource.com/69581
Commit-Queue: Daniel Hillerström <hillerstrom@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2018-08-16 07:07:40 +00:00
Dan Rubel ad6029c608 Update fasta parser to split ">>=" when parsing type var
Change-Id: Id60da00165ef1c7d9128985ccadef06f62637a24
Reviewed-on: https://dart-review.googlesource.com/70181
Commit-Queue: Dan Rubel <danrubel@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-08-16 01:04:46 +00:00
Dan Rubel 825df975a0 Revise fasta type arg/param parsing to ignore "<".endGroup
The scanner associates '<' with '>' and '>>',
but the parser cannot use '<'.endToken/endGroup reliably
and wastes time updating that token's endToken/endGroup field.

This CL updates type info parsing to ignore '<'.endGroup
and step through the token stream (which it has to do anyway),
for improved parsing.

This CL causes a handful of existing tests to fail (marked as @failingTest)
and test failures will be addressed in a subsequent CL.

Change-Id: I788e9a74cd2891f98f44bba15d5669febfec6c64
Reviewed-on: https://dart-review.googlesource.com/70001
Commit-Queue: Dan Rubel <danrubel@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-08-15 22:16:40 +00:00
Brian Wilkerson 0bcf767d4d Clean up more preview-dart-2 related code
Change-Id: Id1f81a635727f0f2fafb5dea4178f303c6ca4659
Reviewed-on: https://dart-review.googlesource.com/70143
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-08-15 14:43:12 +00:00
Brian Wilkerson 49437e3bae Split TooManyArguments to support quick fixes
Change-Id: I31511f619cafbce01f68d6e182328567a2bc3523
Reviewed-on: https://dart-review.googlesource.com/70021
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-08-15 13:24:22 +00:00
Keerti Parthasarathy b99e41ac6f Revert "fix #28233, add hint for missing returns to function expressions"
This reverts commit 058510eeab.

This causes a lot of missing_return failures internally and requires time to fix.

Change-Id: I2c7a79c6e838bbd9f101f53919b1db2c0d4a2594
Reviewed-on: https://dart-review.googlesource.com/70024
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2018-08-14 21:10:27 +00:00
Devon Carew 6a4f1b76ac Remove the --preview-dart-2 option from dartanalyzer and the analysis server.
Change-Id: I268b9d5f79b30d0e4a0f8e6bb81a7738c98e5eea
Reviewed-on: https://dart-review.googlesource.com/69802
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-08-14 04:24:47 +00:00
Brian Wilkerson 5f4343f864 Remove the analyzer code from DuplicatedNamePreviouslyUsedCause
Change-Id: Ia605421652a045b282b856be1ecfe7bd086876d9
Reviewed-on: https://dart-review.googlesource.com/69801
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2018-08-13 22:37:27 +00:00
Dan Rubel 9619e2cd77 Remove unused fasta parser methods and event parameter
Change-Id: I0bf050a475ad3548342307027d14aba4badf468e
Reviewed-on: https://dart-review.googlesource.com/69620
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-08-13 16:42:12 +00:00
Daniel Hillerström b244c0805d Extends the type checking of async functions to check whether the
declared return type of an async function is a super type of Future<T>
for any T.  In case the check is not successful an error message is
produced. The location of the name of the offending function
declaration is used as location information for message. Ideally we
would use the location of the type, so until types get annotated with
location information the error message remains suboptimal.

This closes #33425 and closes #34057.

Thanks to dmitryas and jensj for their helpful guidance.

Bug: dartbug.com/33425 dartbug.com/34057
Change-Id: I3b3dadc25b574422ea1f38671fe8cba3ffdd494c
Reviewed-on: https://dart-review.googlesource.com/69307
Commit-Queue: Daniel Hillerström <hillerstrom@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2018-08-13 12:22:47 +00:00
Konstantin Shcheglov fe0640e3b1 Refactor way of providing file info, set codeRange for units.
This fixes a lot of search/refactoring tests, about 200.

R=brianwilkerson@google.com

Change-Id: I6ce5f61a08b8effa73ffde3861ff68eadd1f4e04
Reviewed-on: https://dart-review.googlesource.com/69383
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-08-10 20:43:54 +00:00
Sam Rawlins 761178e471 Fix DEAD_CODE issue when break label is found inside a for-each.
Fixes #31714.

Bug: https://github.com/dart-lang/sdk/issues/31714
Change-Id: I36580a16604765497ee117625cb0b035603a69f3
Reviewed-on: https://dart-review.googlesource.com/69281
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-08-10 19:39:13 +00:00
danrubel 8e2141f1cf Fix parsing typedefs with <T>=
This is the first CL of several needed to fix typedef parsing
when there is no space between the type parameters and the `=`.

  typedef F<T>= T Function(T);

* Fix some typedef parsing failures
* Add new consts for simple type var ending with ">>" and ">="
* Update computeType and computeTypeParamOrArg to return new consts
* Extract splitGtEq/GtGt/GtGtEq from splitEndGroup
* Hide internal TypeInfo and TypeParamOrArgInfo consts

Change-Id: Ice550f5b15df1f3cad616a2a342644974f14d8ee
Reviewed-on: https://dart-review.googlesource.com/69261
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-08-10 15:09:21 +00:00
Konstantin Shcheglov 666c8c1a89 Fix @visibleForTemplate tests on Windows.
TBR

R=brianwilkerson@google.com

Change-Id: I97ac89b7f3207a60fb2512a2a0af5aba231a7a35
Reviewed-on: https://dart-review.googlesource.com/69244
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-08-09 22:52:33 +00:00
Sam Rawlins 7818db20a7 Add analysis hint for invalid use of @visibleForTemplate code.
Bug: https://github.com/dart-lang/sdk/issues/33353
Change-Id: Iaafccc3dca6b8d87bd54ed721871c72e9ac456c8
Reviewed-on: https://dart-review.googlesource.com/68432
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-08-09 16:51:45 +00:00
Konstantin Shcheglov a1ca88f554 Resolve invocation arguments to parameters.
R=brianwilkerson@google.com

Change-Id: I76a8ea8221e0a888253af8297fb50c423699e175
Reviewed-on: https://dart-review.googlesource.com/69000
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-08-08 21:38:59 +00:00
Dan Rubel 1cd9175e3e Fix mixed dartdoc processing
This change should fix the failing ResynthesizeAstStrongTest.test_class_documented_mix test.

Change-Id: I0b89fa5ddbb4725ec0115836e8b5e801d18678c5
Reviewed-on: https://dart-review.googlesource.com/68900
Commit-Queue: Dan Rubel <danrubel@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-08-08 14:59:13 +00:00
danrubel 1f4449658d Refactor dartdoc parsing
This alters the way that dartdoc is parsed,
preventing null comment references from being pushed onto the stack.
This removes the need to remove those nulls prior to creating
the documentation comment AST nodes and allows for fixed sized lists.

This also address comments in:
* https://dart-review.googlesource.com/c/sdk/+/68520
* https://dart-review.googlesource.com/c/sdk/+/68461

Change-Id: I679c425b5d1f3f7954281d226815a80e73dcc033
Reviewed-on: https://dart-review.googlesource.com/68780
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-08-07 22:28:55 +00:00
Konstantin Shcheglov 80e08e0913 Use 'useCFE' flag to turn on CFE in AnalysisDriver.
R=brianwilkerson@google.com

Change-Id: If0aa7d10bc46f1dd408d0be8128fc25538758359
Reviewed-on: https://dart-review.googlesource.com/68720
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-08-07 16:12:47 +00:00
danrubel 89fd468b89 remove unused DocumentationCommentToken.references field
Change-Id: Ia35dfe2c69d4f35d3a54dd0fcb026de23d888d1c
Reviewed-on: https://dart-review.googlesource.com/68520
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-08-07 16:07:09 +00:00
danrubel 49b18446c2 Refactor dartdoc parsing
This extracts and refactors a sizable chunk of dartdoc parsing out of AstBuilder
and into the fasta parser. Parsing dartdoc does not happen unless the listener
calls the new fasta parser parseCommentReferences method.

The new parseCommentReferences method generates a handleCommentReferenceText
event for each comment reference encountered. The listener calls the scanner
to tokenize the comment reference and forwards the result to a new
fasta parser parseOneCommentReference method. This method generates either
a handleCommentReference or a handleNoCommentReference depending upon
whether or not a reference is parsed.

parser.parseCommentReferences
* generates handleCommentReferenceText events
* returns # of events generated

listener.handleCommentReferenceText
* calls parser.parseOneCommentReference

parser.parseOneCommentReference
* generates either handleCommentReference or handleNoCommentReference

There are further improvements to be made, but I believe this chunk
will allow progress to be made on the kernel side.

Change-Id: I393dc4d1d4791b3d7a529f6cb3c16db3a5befddf
Reviewed-on: https://dart-review.googlesource.com/68461
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-08-07 16:07:09 +00:00
Konstantin Shcheglov cec29e4aa8 Infer original expression in SyntheticExpressionJudgment.
Change-Id: I91a27d06ccf4197274fc96597d384ba4e2335dbd
Reviewed-on: https://dart-review.googlesource.com/68426
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-08-06 21:04:22 +00:00
Konstantin Shcheglov 8df84c0a00 Store resolution for out of range integer literals.
R=brianwilkerson@google.com

Change-Id: Ice783c3fc279bfd34a5aeebf4e9e9f5f014c000b
Reviewed-on: https://dart-review.googlesource.com/68423
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-08-03 20:32:38 +00:00
Konstantin Shcheglov 8114ecb351 Fix tests after fixing constant fields with CFE.
TBR

R=brianwilkerson@google.com

Change-Id: I121694e2f7f865b521110bf41875f4557e456e33
Reviewed-on: https://dart-review.googlesource.com/68420
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-08-03 18:55:54 +00:00
Konstantin Shcheglov 8692936f48 Verify constants using Analyzer.
This fixes 44 failing language_2 tests.

Change-Id: I9248a940c56764d030e5cb1c8d558a3d41b88899
Reviewed-on: https://dart-review.googlesource.com/68340
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-08-03 17:39:54 +00:00
danrubel 368bcc47df Add parse dartdoc tests for fasta parser
Change-Id: Ieb8ed7d09abdae097f991aae566cd6256b18ef24
Reviewed-on: https://dart-review.googlesource.com/68202
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-08-03 14:55:56 +00:00
Konstantin Shcheglov 380696fe3f Set element/type for some resynthesized expressions.
R=brianwilkerson@google.com

Change-Id: I4a3d809fedac9eeb17eb996f8206a946201d6da8
Reviewed-on: https://dart-review.googlesource.com/68260
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-08-02 23:56:47 +00:00
Brian Wilkerson 87f753dbd3 Replace some declarations of element with declaredElement
Change-Id: Idd62472b16cccaa98749a510197ec8d0f5053cb1
Reviewed-on: https://dart-review.googlesource.com/67820
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2018-08-02 16:00:36 +00:00
Konstantin Shcheglov 4b07df24dd Store invalid deferred types used in bodies.
R=brianwilkerson@google.com, paulberry@google.com

Change-Id: Id9f6309b5a9af69d38305c538bacb967c4565793
Reviewed-on: https://dart-review.googlesource.com/67688
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2018-08-01 00:54:09 +00:00
danrubel 4b2ee8e9a5 Improve catch clause recovery
Fix https://github.com/dart-lang/sdk/issues/33982

Change-Id: I98387ffabef87dd0296f18e080a1c4b8a7e97c2b
Reviewed-on: https://dart-review.googlesource.com/67641
Commit-Queue: Dan Rubel <danrubel@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-07-31 20:30:03 +00:00