Commit Graph

3034 Commits

Author SHA1 Message Date
danrubel 7cd25705ab Fix parsing label between 2 switch cases
Fix https://github.com/dart-lang/sdk/issues/34453

Change-Id: Ib2280c4482b6530dab3947a0dfd87490bd379034
Reviewed-on: https://dart-review.googlesource.com/75960
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-09-21 19:36:40 +00:00
Paul Berry 5cf0d9e844 Replicate existing analyzer supermixin tests using new "mixin" syntax.
A few test cases fail.  I'll investigate them and follow up with fixes.

Change-Id: I934e82a2ecec68f72ed46fb698b065186ef38aad
Reviewed-on: https://dart-review.googlesource.com/75980
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-09-21 18:34:42 +00:00
Paul Berry ead158ab5d Fix gatherMixinSupertypeConstraints to handle named mixin applications.
In a named mixin application, the superclass doesn't include the last
type appearing in the "with" clause, so that class isn't considered a
superclass constraint.

Fixes some test cases broken by 46e5954b0a.

Change-Id: I2e824d38017fe2c7eaa23e8f185cea07fe2222b7
Reviewed-on: https://dart-review.googlesource.com/75940
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-09-21 16:37:55 +00:00
Paul Berry 46e5954b0a Turn on and fix mixin type inference checks when not in "supermixin" mode.
Now that we have an explicit syntax for mixins that is available all
the time, we have to do mixin inference error checking all the time,
not just when the "--supermixin" flag is supplied.

This required fixing several minor bugs:

- ErrorVerifier._checkForMixinSuperInvokedMembers did not properly
  handle a mixinElement argument that was a ClassElementHandle.

- ErrorVerifier._checkMixinInference wasn't using the actual
  substituted mixin types, causing errors to be wrongly reported when
  a class declaration had multiple inferred mixins (this was the root
  cause of #34404).

- Type names in "with" clauses in the resolved AST weren't properly
  reflecting the mixin type arguments that had been inferred.

Fixes #34404.

Change-Id: Ia773233c66f8d9ab778f207689c73922e9e3a880
Reviewed-on: https://dart-review.googlesource.com/75792
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-09-21 01:06:25 +00:00
Mike Fairhurst 0ec9945885 Fix #33629 boolean negation of void
Bug: 33629
Change-Id: Ieabd07cd7155b60466bf6873ba8252c9b5cb8d70
Reviewed-on: https://dart-review.googlesource.com/75784
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2018-09-20 23:58:48 +00:00
Paul Berry d32e93db46 Remove unused import.
This import was mistakenly added in 2e3f17fa2b.

Change-Id: Ie89d47d4168c84eacea9d11b4c7f5bf986f5c2d7
Reviewed-on: https://dart-review.googlesource.com/75661
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-09-20 15:44:25 +00:00
Paul Berry 4baa3ec951 Create a base class for non-error resolver test cases.
This avoids the need to override tests in NonErrorResolverTest_Driver
to indicate that they pass.

Change-Id: I2a980889bc3e32db2c6ac3873bf439a12b23c63e
Reviewed-on: https://dart-review.googlesource.com/75660
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-09-20 15:44:16 +00:00
Paul Berry 2e3f17fa2b Add support for the new mixin syntax to supertype constraint checking and resynthesis.
Partially addresses #34404.

Change-Id: Ia115647c7e6e15092a7dca55287ff0680b780a97
Reviewed-on: https://dart-review.googlesource.com/75625
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-09-20 02:34:36 +00:00
Konstantin Shcheglov 81ce969060 Enable implicit constructors with optional parameters in mixin applications.
The spec changed in https://github.com/dart-lang/sdk/commit/63c6851dd01514e9d9e6cb96da0430e15b66d576

R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/34375
Change-Id: If7ba66d82fa4127cc6764d93f299790e8a862b42
Reviewed-on: https://dart-review.googlesource.com/75422
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-09-19 16:12:21 +00:00
Konstantin Shcheglov ddcb8b7bb3 Remove unused SubtypeManager.
R=brianwilkerson@google.com

Change-Id: I4ec2bec51912817621361bf170257c6dfe972189
Reviewed-on: https://dart-review.googlesource.com/75123
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-09-16 02:27:14 +00:00
Dan Rubel 49da026e3e Report error for extends void type parameters
Change-Id: I634b836ea40199a1e7962b7d07ca9f5d1ef3f16a
Reviewed-on: https://dart-review.googlesource.com/74680
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-09-13 20:27:56 +00:00
Mike Fairhurst 4ee66c9708 Const evaluation for int2double
Change-Id: I4673ab47d9dfcb8de62a5190a6dd2b9c79ef1d19
Reviewed-on: https://dart-review.googlesource.com/74496
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-09-13 00:02:54 +00:00
Konstantin Shcheglov d09429debb Generate more mixin errors.
R=brianwilkerson@google.com

Change-Id: Ia858efb270caa5664728395d47b4e31e34a0ed91
Reviewed-on: https://dart-review.googlesource.com/74667
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-09-12 20:54:28 +00:00
danrubel 4fe0088962 Report error if super on RHS of binary expression
Change-Id: I6251d56f4df5ebb603b653a100fed2c643870c96
Reviewed-on: https://dart-review.googlesource.com/74601
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-09-12 18:10:26 +00:00
Konstantin Shcheglov f89053aecc Report ABSTRACT_SUPER_MEMBER_REFERENCE as error.
R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/33662
Change-Id: Ic80386c20acd2cd1ceebeb90fbb1d6e18982b024
Reviewed-on: https://dart-review.googlesource.com/74499
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-09-12 17:07:18 +00:00
danrubel d97a189ec8 Update AstBuilder to check if conditional expression contains assignable expressions
... and update a couple old analyzer tests

Change-Id: Id4f74857bc9e43cb31da38182788d2c5fe12e375
Reviewed-on: https://dart-review.googlesource.com/74523
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-09-12 11:10:56 +00:00
Mike Fairhurst 6784fb596f First wave of int2double -- accept doubles as ints except const
Change-Id: I79661b8cf6e1395302b03f1bd3d0260225ffc5e4
Reviewed-on: https://dart-review.googlesource.com/73841
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-09-11 22:00:48 +00:00
Konstantin Shcheglov a02a589813 Keep just one UNDEFINED_GETTTER/METHOD/SETTER error.
There is no distinction between them from the langauge of view anymore.

This is a preparatory step before reporting super-invoked abstract
class members as errors, which we should do according to the issue.

Which, in turn, is for consistency between repoting corresponding
error for super-invoked, but not concrete members in mixin applications.

R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/33662
Change-Id: I00e8f185dbbdd1ffac88c500394a1e1497be6f9a
Reviewed-on: https://dart-review.googlesource.com/74481
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-09-11 18:40:02 +00:00
Kevin Millikin 2b296a0671 Enable mixin declaration syntax in Fasta
This enables mixin declarations for the Dart VM by parsing them into
class declarations.

Change-Id: Ic792009bc450d7c887f2e9962040ffad807881eb
Reviewed-on: https://dart-review.googlesource.com/74480
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
2018-09-11 18:05:52 +00:00
danrubel d35c18999f Disallow type parameters of the form <X super Y>
Fix https://github.com/dart-lang/sdk/issues/28848

Change-Id: I1b8cd943b5af448fb6f5826d002d0b5a403e6bba
Reviewed-on: https://dart-review.googlesource.com/74241
Commit-Queue: Dan Rubel <danrubel@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-09-11 15:30:03 +00:00
Konstantin Shcheglov 0eee800e1b Report INCONSISTENT_METHOD_INHERITANCE for mixins.
R=brianwilkerson@google.com

Change-Id: I4bfcbccd20049d80deaca346cabf580bdbcaf266
Reviewed-on: https://dart-review.googlesource.com/74320
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-09-10 23:47:44 +00:00
Kevin Millikin cbfc78f5b2 Parse mixin declarations as if they were classes
In Fasta's outline builder, parse mixin declarations as if they were
the corresponding class declaration:

mixin M<T0,...,Ti> on S0,S1,...,Sj implement I0,...,Ik {...}

is parsed as if it were:

class M<T0,...,Ti> extends S0 with S1,...,Sj implements I0,...,Ik {
  ...
}

This supports the syntax and should automatically provide an
implementation of the runtime semantics on the VM.  Not all of the
required static checks are implemented in the front end.

Change-Id: Ice65e93446222484272f8f7db0de2d18c352f56b
Reviewed-on: https://dart-review.googlesource.com/73760
Reviewed-by: Dan Rubel <danrubel@google.com>
2018-09-10 20:40:45 +00:00
Konstantin Shcheglov b6c98976d5 Report CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE for mixins.
R=brianwilkerson@google.com

Change-Id: I513d1026793829a3df7ad46ab40c9c4ddeb379be
Reviewed-on: https://dart-review.googlesource.com/74263
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-09-10 20:30:23 +00:00
Konstantin Shcheglov 3346632ad3 Report CompileTimeErrorCode.EXTENDS_NON_CLASS for mixins.
I'm also renaming an error to MIXIN_SUPER_CLASS_CONSTRAINT_NON_INTERFACE,
because the spec says that `on` clause uses interfaces, not classes.

R=brianwilkerson@google.com

Change-Id: I561fd5605b66cf5a6e870c037ac16c43fc81b403
Reviewed-on: https://dart-review.googlesource.com/74260
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-09-10 18:11:00 +00:00
Konstantin Shcheglov 63fbfcc69a Translate InvalidInlineFunctionType to ParserErrorCode.INVALID_INLINE_FUNCTION_TYPE.
R=brianwilkerson@google.com, danrubel@google.com

Change-Id: I2b1c7938c081b771e554149846c8157f8332e061
Bug: https://github.com/dart-lang/sdk/issues/33398
Reviewed-on: https://dart-review.googlesource.com/74043
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
2018-09-10 16:08:41 +00:00
danrubel a9cc6f0f19 Revise with clause event handling
This replaces the begin/endMixinApplication events which were used in both
```
  class A = B with M;
```
and
```
  class A extends B with M { }
``
with different events for each of the above situations.
This change facilitates properly handling class declarations of the form
```
  class A with M { }
```

Removed event:
* beginMixinApplication
* endMixinApplication

Added events:
* handleNamedMixinApplicationWithClause
* handleClassWithClause
* handleClassNoWithClause

Change-Id: Ifa0ecfd7ff8c408087ad78036ad35ba4a00728c6
Reviewed-on: https://dart-review.googlesource.com/73940
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-09-07 19:33:51 +00:00
Konstantin Shcheglov 1e65a6fa7f Check for conflicts of constructors and static members.
R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/34371
Change-Id: I55494cbb770dbdc1418cac9c74672ebbab7ab24d
Reviewed-on: https://dart-review.googlesource.com/74004
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-09-07 18:33:15 +00:00
Dan Rubel 7905136e64 Allow with clause without extends clause
This removes the code the generates an error when a `with` clause
is used without an `extends` clause as in
```
   class C with M { }
```
This is the first of several CLs to update the parser
as this CL only prevents the error from being generated.

Change-Id: I1d5c8577902e253a4c83cda2f6a1d4ab98319903
Reviewed-on: https://dart-review.googlesource.com/73687
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-09-07 00:25:58 +00:00
Konstantin Shcheglov e13197d192 Update checks for conflicting class members.
R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/34371
Change-Id: Ic056ff4b2f7c7105d12e9b439fcc0cd268cd5ac1
Reviewed-on: https://dart-review.googlesource.com/73301
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-09-06 22:56:06 +00:00
danrubel dc0aae5c44 Improve super initializer recovery
This CL addresses one of the issues in https://github.com/dart-lang/sdk/issues/34041
by fixing an AstBuilder crash and improving recovery of super constructor calls
in a constructor initializer list.

In addition, this adds a TestDescriptor adjustValidUnitBeforeComparison field
to support the new recovery tests.

Change-Id: I9e687aed34ea293700bd45d7c13ce36e83a00a05
Reviewed-on: https://dart-review.googlesource.com/73286
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-09-06 01:16:55 +00:00
Konstantin Shcheglov 239bd1383b Report MEMBER_WITH_CLASS_NAME for static getter/setter with the enclosing class name.
R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/34289
Change-Id: I8b593b4a652547e54ed06c80e34e82c11a14d7e8
Reviewed-on: https://dart-review.googlesource.com/73241
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-09-05 18:11:00 +00:00
Konstantin Shcheglov b443c9f72f Parse static get/set with name of the enclosing class as getters/setters.
R=brianwilkerson@google.com, danrubel@google.com

Change-Id: I97015fbc3bc49c70a022a2edabf4fcdcc34405ad
Reviewed-on: https://dart-review.googlesource.com/73020
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-09-05 15:43:48 +00:00
Konstantin Shcheglov 48a1504b2f Stop reporting CONFLICTING_INSTANCE_GETTER_AND_SUPERCLASS_MEMBER and CONFLICTING_INSTANCE_SETTER_AND_SUPERCLASS_MEMBER.
These errors were removed from the spec.
See also https://github.com/dart-lang/sdk/issues/33235

R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/34331
Change-Id: Ibc675aa48165300ddac32a8d6ddef4d84d41952a
Reviewed-on: https://dart-review.googlesource.com/72903
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-09-04 20:29:06 +00:00
Konstantin Shcheglov d65a0ee361 Report more errors for mixin declarations.
I added a fix for parsing static methods in mixins.

R=brianwilkerson@google.com, danrubel@google.com

Change-Id: Ib3c91f6cd5a2eb333f88102609f709fcac1ab9e7
Reviewed-on: https://dart-review.googlesource.com/72901
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-09-04 19:41:25 +00:00
Konstantin Shcheglov a52b40041b Report MIXIN_DECLARES_CONSTRUCTOR and FINAL_NOT_INITIALIZED for mixins.
I renamed the previous error const to MIXIN_CLASS_DECLARES_CONSTRUCTOR.

R=brianwilkerson@google.com

Change-Id: If06f264e61b7d3e7c254eb457f4b2dc45ef76174
Reviewed-on: https://dart-review.googlesource.com/72860
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-09-04 17:17:07 +00:00
danrubel 4cd69887e3 Fix parsing postfix expressions with type parameters
Fix https://github.com/dart-lang/sdk/issues/34315

Change-Id: Id6b1749070473ed5a04a3f024276f9985f82da6e
Reviewed-on: https://dart-review.googlesource.com/72560
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-09-02 18:51:31 +00:00
Konstantin Shcheglov a4a80a0bf1 Start reporting errors for mixin super-class constraints and implements clauses.
R=brianwilkerson@google.com, paulberry@google.com

Change-Id: I6e6e3edc16737b1d3f665982f7560b46d8b71f01
Reviewed-on: https://dart-review.googlesource.com/72522
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-08-31 20:25:35 +00:00
Konstantin Shcheglov e96652352d Resolve mixin declarations.
Errors for onClause are not correct yet, and not tested yet.

R=brianwilkerson@google.com

Change-Id: I9a1f2b4734661baac85a9d1b9311d21104c7c495
Reviewed-on: https://dart-review.googlesource.com/72360
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-08-31 16:11:21 +00:00
Dan Rubel fa759513ac Add mixin header recovery
Along with the new recovery, there are two new error codes
and their corresponding CFE counterparts:
* ParserErrorCode.IMPLEMENTS_BEFORE_ON
* ParserErrorCode.MULTIPLE_ON_CLAUSES
* ImplementsBeforeOn
* MultipleOnClauses

Change-Id: If9055c9ffa5d56495acf00889236a3a8f6d741ca
Reviewed-on: https://dart-review.googlesource.com/72123
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-08-31 00:25:16 +00:00
Konstantin Shcheglov c9d1c4a3b7 Suite of source code based resolution tests.
As opposite to constructing AST nodes and calling partial resolvers.

Also the set of tests that we created for CFE integration is too large,
so I started splitting it into pieces and cleaning up to use findNode,
fincElement, and assertElement/Type().

R=brianwilkerson@google.com, paulberry@google.com

Change-Id: Ide4f0bee9e89eb2daf2317d1d92303a992847f1b
Reviewed-on: https://dart-review.googlesource.com/72240
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-08-30 21:49:44 +00:00
Konstantin Shcheglov db8b6bc549 Don't report StaticWarningCode.CONFLICTING_DART_IMPORT.
The warning was removed from the language specification.

Plus some optimization for import scope and conflicts.

R=brianwilkerson@google.com, paulberry@google.com

Change-Id: I78b6924f9095dce89324f4093e78c948611f8493
Reviewed-on: https://dart-review.googlesource.com/72064
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-08-30 20:56:41 +00:00
Dan Rubel 8c7e83aed2 Remove generic method comment support
Change-Id: I1149ff9c61748fe8d3a51c95e40c02ec5115b0e7
Reviewed-on: https://dart-review.googlesource.com/72122
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-08-30 17:52:40 +00:00
Dan Rubel ba0d814336 Remove obsolete parser tests
Change-Id: I74f0f65e0888a185644f9908e5a25e0c550113ec
Reviewed-on: https://dart-review.googlesource.com/72120
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-08-30 15:37:44 +00:00
Peter von der Ahé f5f33776a4 Revert "Store code ranges for formal parameters."
This reverts commit 5b9a42de29.

Change-Id: If6b3edc7194fda050de3b6ffbb0c8124a75509a6
Reviewed-on: https://dart-review.googlesource.com/72100
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Peter von der Ahé <ahe@google.com>
2018-08-30 10:20:18 +00:00
Konstantin Shcheglov d659022f08 Build elements for MixinDeclaration(s).
R=brianwilkerson@google.com, paulberry@google.com

Change-Id: Ica9912b795bbdfeea2dd46130e30bde3bdc4cef3
Reviewed-on: https://dart-review.googlesource.com/72067
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-08-29 21:05:35 +00:00
Konstantin Shcheglov 1f52372bfa Remove CFE integration from analyzer, analysis_server, and analyzer_cli.
AnalysisDriverResolutionTest is partially updated, about 30 failing
tests added. I will get back to it in a following CL, it is not
directly CFE integration, but updated understanding how we want to
resolve. For example we don't need types for non-expression identifiers.

Change-Id: I3daddbb6c66ffad7a726f3313a1199fd7387aa04
Reviewed-on: https://dart-review.googlesource.com/71883
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-08-29 13:46:45 +00:00
danrubel 68e66d4ef5 Parser test cleanup
Change-Id: I93c6a019267d3538e2874acdd06041a330b2cb09
Reviewed-on: https://dart-review.googlesource.com/71900
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-08-28 23:00:16 +00:00
Janice Collins f40ff153a9 Enable --use-fasta-parser with the analyzer by default.
Based on Devon's change at:

https://dart-review.googlesource.com/c/sdk/+/67090

Change-Id: I80b7943826e248bf37d9bbbb769330d24b0dd6ae
Reviewed-on: https://dart-review.googlesource.com/70160
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Janice Collins <jcollins@google.com>
2018-08-28 19:29:17 +00:00
Konstantin Shcheglov 07fb992964 Report CompileTimeErrorCode.FOR_IN_WITH_CONST_VARIABLE
R=brianwilkerson@google.com, paulberry@google.com

Bug: https://github.com/dart-lang/sdk/issues/25161
Change-Id: I27ebc09fd9fcd6d6d992268f158e80477c41d042
Reviewed-on: https://dart-review.googlesource.com/71424
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-08-26 20:09:46 +00:00
Konstantin Shcheglov 04e2ada09b Report StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS for dynamic and type parmaeters.
R=brianwilkerson@google.com, paulberry@google.com

Bug: https://github.com/dart-lang/sdk/issues/28813
Change-Id: Iae43c0bb913bfd06fa09ddeacd6fdb8f81eccf9a
Reviewed-on: https://dart-review.googlesource.com/71423
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-08-26 03:42:31 +00:00