Commit Graph

7628 Commits

Author SHA1 Message Date
Paul Berry e3dbea9523 Convert declaration_resolver.dart to triple-slash comment style.
Change-Id: I91ba7c77963d0376211dbfb05ba4eeb998d2311b
Reviewed-on: https://dart-review.googlesource.com/75662
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-09-20 15:52:20 +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
Peter von der Ahé 06792cb91f Remove StackListener.popList
Change-Id: I0391b52a0be34c2cf61ac66e06c565e1f311182a
Reviewed-on: https://dart-review.googlesource.com/75680
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Commit-Queue: Peter von der Ahé <ahe@google.com>
2018-09-20 14:15: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 41273507b2 Detect references to instance variables without declared type.
R=paulberry@google.com

Bug: https://github.com/dart-lang/sdk/issues/33976
Change-Id: Iea377061a784d73d41a4f77f10f74077f8797813
Reviewed-on: https://dart-review.googlesource.com/75623
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-09-19 22:40:03 +00:00
Devon Carew 7df4900a94 Train the dartanalyzer tool on generating summaries.
Change-Id: Ic887eb2135161b5795a2456d38677f016bbe3643
Reviewed-on: https://dart-review.googlesource.com/75561
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2018-09-19 17:43:46 +00:00
Konstantin Shcheglov 80c1b88626 Add copyright comments in resolution tests.
R=brianwilkerson@google.com, paulberry@google.com

Change-Id: Iaac51f9d4cd0ef248e8a5bf88ff6388ac7ab83c5
Reviewed-on: https://dart-review.googlesource.com/75560
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-09-19 16:58:07 +00:00
Konstantin Shcheglov bbe49524be Cache mapping from subtypes names to files where they are subtyped.
This improves performance of computing 'implemented' notifcations in
large workspaces (about 3000 files in the performance data below) and
multiple classes in the target file.

Here is data for switching between a file with a few classes, and file
with many classes. With this change it works about 10 times faster.

Before:
1537333173060 <= Computed implemented in 36 ms.
1537333173918 <= Computed implemented in 195 ms.
1537333174261 <= Computed implemented in 28 ms.
1537333175088 <= Computed implemented in 161 ms.
1537333175556 <= Computed implemented in 44 ms.
1537333176341 <= Computed implemented in 163 ms.
1537333176706 <= Computed implemented in 23 ms.
1537333177517 <= Computed implemented in 186 ms.
1537333177935 <= Computed implemented in 45 ms.
1537333178690 <= Computed implemented in 145 ms.
1537333179091 <= Computed implemented in 22 ms.
1537333179863 <= Computed implemented in 152 ms.
1537333180212 <= Computed implemented in 26 ms.
1537333181001 <= Computed implemented in 201 ms.
1537333181295 <= Computed implemented in 28 ms.
1537333182126 <= Computed implemented in 220 ms.
1537333182429 <= Computed implemented in 45 ms.
1537333183097 <= Computed implemented in 154 ms.
1537333183425 <= Computed implemented in 25 ms.
1537333184227 <= Computed implemented in 255 ms.

R=paulberry@google.com

After:
1537335150782 <= Computed implemented in 0 ms.
1537335151634 <= Computed implemented in 15 ms.
1537335152369 <= Computed implemented in 0 ms.
1537335153192 <= Computed implemented in 14 ms.
1537335153917 <= Computed implemented in 0 ms.
1537335154807 <= Computed implemented in 14 ms.
1537335155464 <= Computed implemented in 0 ms.
1537335156370 <= Computed implemented in 14 ms.
1537335157052 <= Computed implemented in 0 ms.
1537335157926 <= Computed implemented in 21 ms.
1537335158621 <= Computed implemented in 2 ms.
1537335159466 <= Computed implemented in 29 ms.
1537335160081 <= Computed implemented in 0 ms.
1537335160942 <= Computed implemented in 24 ms.
1537335161568 <= Computed implemented in 0 ms.
1537335162384 <= Computed implemented in 33 ms.
1537335162979 <= Computed implemented in 0 ms.
1537335163777 <= Computed implemented in 36 ms.
1537335164391 <= Computed implemented in 0 ms.
1537335165265 <= Computed implemented in 14 ms.
Change-Id: Ie80fa957104d394320d73306e6f506b30069a18b
Reviewed-on: https://dart-review.googlesource.com/75500
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-09-19 16:55:27 +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 bbe83465ea Test that type of the ListLiteral with two different enums is inferred.
R=brianwilkerson@google.com, paulberry@google.com

Change-Id: I7b0980008fe58a1b430f989af72fb04c0fb07c8c
Reviewed-on: https://dart-review.googlesource.com/75385
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-09-19 00:37:59 +00:00
Alexandre Ardhuin abb392fc0d add Pubspec.dependencyOverrides
Closes #34513
https://github.com/dart-lang/sdk/pull/34513

GitOrigin-RevId: 067b26fde3631f877a6a84453ab60702bd242142
Change-Id: I4eb6ec3567d6dabfbf0a5e69fe4c6094e3a22d04
Reviewed-on: https://dart-review.googlesource.com/75360
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-09-18 20:17:06 +00:00
Konstantin Shcheglov dcabf2cb0e Test for mixin declaration isObject and tweaks for error verifier.
R=brianwilkerson@google.com

Change-Id: I902dfdaf5e39c457e2ff365dfdd6b8f4d830497f
Reviewed-on: https://dart-review.googlesource.com/75381
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-09-18 19:55:56 +00:00
Konstantin Shcheglov a27bafc306 Check that the concrete member in the class has same type as the super-invoked member in the mixin.
R=brianwilkerson@google.com

Change-Id: I985872d2eb5eaf7608b030b9803d664ad0878b04
Reviewed-on: https://dart-review.googlesource.com/75243
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-09-18 17:06:22 +00:00
Jenny Messerly 0496569f09 implement super mixins in dartdevc and fix a few issues in Analyzer
Fixes #34167. This implements the Dart 2 mixin proposal
(https://goo.gl/KEKQyv) for DDC. When the mixin is applied, a class
is created for the application that extends the correct superclass
and has all of the instance members, so `super` works correctly.

This also fixes a few minor issues in Analyzer's (mostly complete)
implementation:
- InterfaceType.isObject now returns false for Dart 2 mixins.
- Least upper bound calculation recognizes mixins are not Object.
- Interface of the mixin now implements its superclass constraints.
- Mixin superclass constraints are checked against the superclass and
  all previously applied mixins (if any); this keeps it working with
  the subtype fix above, and also prevents a not-yet-applied mixin
  from satisfying the constraint

The language_2/mixin_declaration tests were updated with a few minor
fixes now that we can run Analyzer/dartdevc to test them.

This change implements super mixins for DDC's Kernel backend (DDK)
too. This will be enabled once Kernel adds a flag to recognize which
Class nodes are mixins (vs normal classes).


Change-Id: Ib3c4fcb12de9988345e52d92931196828d8227c3
Reviewed-on: https://dart-review.googlesource.com/74965
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
2018-09-18 03:21:48 +00:00
Paul Berry f8eeddbc5b Fix missing import in unlinked_api_signature_test
Change-Id: I4144df4b98af2c213641715be4fbb03ee20df6c8
Reviewed-on: https://dart-review.googlesource.com/75204
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-09-17 19:49:17 +00:00
Konstantin Shcheglov bd103ebc50 Store unlinked data with unlinked salt.
Before this change we used the whole AnalysisOptions.signature as salt.
This means that if two packages have different set of lints, they have
different options signatures, and so we have to parse and compute
unlinked data for SDK and all shared packages separately. But unlinked
data depends only on very small set of options, practically only on
parser options.

This improves performance on workspaces with many modules and empty
cache:

Before:
<= --- Analyzing in 36122 ms.
<= Computed implemented in: 50138 ms.

<= --- Analyzing in 47905 ms.
<= Computed implemented in: 55339 ms.

<= --- Analyzing in 45141 ms.
<= Computed implemented in: 60169 ms.


After:
<= --- Analyzing in 27957 ms.
<= Computed implemented in: 11645 ms.

<= --- Analyzing in 21378 ms.
<= Computed implemented in: 9439 ms.

<= --- Analyzing in 21719 ms.
<= Computed implemented in: 10546 ms.


Here "computed implemented" is computing subtypes of classes in the
open file - it required unlinked data for all files in all available
packages.


It also helps for full cache:
  analysis: 6300 vs. 5700 ms.
  implemented: 5700 vs. 3700 ms.



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

Change-Id: I10dbc6d062617466ad5f35ae77bd1e58a6bb606c
Reviewed-on: https://dart-review.googlesource.com/75128
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-09-16 17:42:23 +00:00
Konstantin Shcheglov c5d77d1d8b Support mixins in more places in index and search.
R=brianwilkerson@google.com

Change-Id: I523726e1c7f5efa2d6e2f4b91204da3f14f181b6
Reviewed-on: https://dart-review.googlesource.com/75120
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-09-16 17:40:16 +00:00
Paul Berry c3bdb6c9b7 Refactor summary resynthesis tests in preparation for using the one-phase summary API.
This CL refactors the summary resynthesis tests similar to how
05ab41c99b refactored the summary
generation tests.  It introduces the following classes:

- The interface `ResynthesizeTestStrategy`, defining the methods that
  can be invoked by tests of summary resynthesis.

- An implementation of that interface:
  `ResynthesizeTestStrategyTwoPhase`.  This drives the summary
  mechanism using the old two-phase summary API.

- Mixin classes `ExprBuilderTestCases` and `ResynthesizeTestCases`
  containing the test cases themselves.

- Mixin classes `ExprBuilderTestHelpers` and `ResynthesizeTestHelpers`
  containing helper methods used by the test cases.

There should be no functional change introduced by this CL, only code
motion.

Change-Id: Ifb84d4d2d8fa17bbc32b833b1f56af7e1217b5ae
Reviewed-on: https://dart-review.googlesource.com/75124
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-09-16 14:11:24 +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
Nate Bosch 0f45b2e5c9 Fix spelling hexidecimal -> hexadecimal
Fixes #34460

Change-Id: I43ce8bbad9bfcc6b14c3a537ada84107e7bfaffe
Reviewed-on: https://dart-review.googlesource.com/74940
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
2018-09-15 01:19:06 +00:00
Konstantin Shcheglov eb9687189d Compute unlinked API signatures without unlinked summaries.
R=brianwilkerson@google.com, paulberry@google.com

Change-Id: I21c87f60d88716eb9c6b1d5e558bb17156daa598
Reviewed-on: https://dart-review.googlesource.com/74925
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-09-14 20:13:55 +00:00
Paul Berry 272473b77e Remove getters allowing access to all enclosing type parameter types.
These getters are private to the analyzer and not used by it.

Change-Id: I203af68124668244dd204bff0cf7a3de4de8e9cd
Reviewed-on: https://dart-review.googlesource.com/74967
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-09-14 15:22:24 +00:00
Konstantin Shcheglov cea39db6e2 Perform instance member inference for mixins.
The set of sets is not comprehensive, no tests for fields and accessors.

R=brianwilkerson@google.com

Change-Id: I105ed6b1d4b5836f61af9f8abe7fed7e7a6b8c59
Reviewed-on: https://dart-review.googlesource.com/74941
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-09-14 04:52:48 +00:00
Paul Berry 65b390ca83 Simplify summary resynthesis tests
By removing unnecessary flags isStrongMode and isSharedFrontEnd.

Change-Id: I18ebb15297cc7dde38d61369d9a18b9e3bce895a
Reviewed-on: https://dart-review.googlesource.com/74966
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-09-14 03:06:05 +00:00
Paul Berry 0e878dd6db Fix several inferred type summary tests.
These tests were relying on some details of the summary representation
that are no longer present, namely the fact that function elements
appearing within initializers (including the synthetic function
element for an initializer) used to have inferred types associated
with them.  The tests have been changed so that they exercise the same
functionality, but they use the inferred type of the variable directly
rather than going through the function elements.

Change-Id: I8e7733674bfa6f8e7f442ea04e7da702f3b11020
Reviewed-on: https://dart-review.googlesource.com/74922
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-09-13 22:17:13 +00:00
Paul Berry 1397fd9342 Fix test_variable_final_top_level_untyped.
This test was previously assuming that variables requiring top level
type inference would have their body expressions encoded in the
unlinked summary; with one-phase summary generation this is no longer
the case.

Change-Id: I47b4f81926eb4bc667a201ba83673e3e0db4c8cb
Reviewed-on: https://dart-review.googlesource.com/74924
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-09-13 21:44:08 +00:00
danrubel 61096acab3 Improve analyzer/fasta error code matching
This addresses a comment in https://dart-review.googlesource.com/c/sdk/+/74600,
updates the "run fasta generate first" exception message,
and converts more Analyzer errors to be auto generated.

Change-Id: I9c98184d1b9fe642dab4d66fbcd961dc27dfa6f9
Reviewed-on: https://dart-review.googlesource.com/74900
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-09-13 21:03:47 +00:00
Paul Berry 1a8b1bfd24 Fix test_bottom_reference_shared.
At some point this test regressed so that it no longer tested the
behavior it purported to test.  The underlying behavior is correct;
the test just had to be fixed.

Change-Id: Ia54cb205b8f1a6062f4078009d24d865d70a6bac
Reviewed-on: https://dart-review.googlesource.com/74921
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-09-13 20:38:56 +00:00
Paul Berry 7bc5c551cd Fix test test_implicit_dependencies_follow_other_dependencies.
The test was assuming that summaries stored relative paths, which they
haven't done for quite some time.

Change-Id: Iee08f1e95650107886df85750e29aaf4267c60bb
Reviewed-on: https://dart-review.googlesource.com/74920
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-09-13 20:36:16 +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
Konstantin Shcheglov 260ea4b591 Add an option to use one-phase summaries.
When this flag is enabled, we fail:
  2 language_2/ tests;
  25 Analyzer tests (mostly by 2 reasons);
  0 Analysis Server tests.

There is a know problem: because unlinked summaries don't include
initializers for variables, we fail to recognize API changes related
to inferred types. I will fix this be computing API signatures from
pertinent tokens.

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

Change-Id: I61734e96ee26b3e04027a103ccf6850695815127
Reviewed-on: https://dart-review.googlesource.com/74700
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-09-13 19:26:16 +00:00
Konstantin Shcheglov 8e4933c172 Tests for ClassElement.allSupertypes for mixins.
R=brianwilkerson@google.com

Change-Id: If8818fba6e3de02c94d098957eaacecb58938abd
Reviewed-on: https://dart-review.googlesource.com/74821
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-09-13 18:16:10 +00:00
Brian Wilkerson c28db2d6e1 Make reporting of some errors conditional
Change-Id: I4bea35cce9f5d3da425425284c056b7ca228993e
Reviewed-on: https://dart-review.googlesource.com/74668
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2018-09-13 15:25:03 +00:00
Brian Wilkerson 927392b2b3 Fix ClassElement.allSupertypes to include superclass constraints as documented
Change-Id: I26deac7467a640714c94a53a9da0aad81a92780a
Reviewed-on: https://dart-review.googlesource.com/74675
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-09-13 01:17:08 +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
Paul Berry 7b9773f9f1 Replace nestingLevel with a more direct computation of De Bruijn indices.
Not all of the TypeParameterElementImpl constructors were setting it
anyway, and this was causing problems with one-phase summary
generation.  It would have taken a lot of plumbing to make all the
constructors set it correctly; it's easier to just compute it on the
fly when we need it.

Change-Id: I99d2e79c98a8a1dfbfb4e7f1fe90490db779a955
Reviewed-on: https://dart-review.googlesource.com/74672
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-09-12 23:31:04 +00:00
Paul Berry 75d8094a0a Fix summarization of unknown types.
Also fix a bug which was preventing type inference from being
performed on initializers that couldn't successfully be serialized to
the unlinked summary.

Change-Id: I270eaf6f1ff4140408353f24935c9eb60bfa9ee1
Reviewed-on: https://dart-review.googlesource.com/74671
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-09-12 22:35:54 +00:00
Konstantin Shcheglov 725443f28c Add FileState.libraryFiles with all files of the library.
Sometimes we need all files, so it would be nice handle both the library
file, and its parts uniformly.

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

Change-Id: I55fa25cf6eff7210990d395c39a8829c647e1f25
Reviewed-on: https://dart-review.googlesource.com/74670
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-09-12 22:24:33 +00:00
Paul Berry 5fc1a75b5d Use correct scopes for one-phase summary type inference.
Change-Id: I2ec5519e73881754426ea4f2560fbb487607efb9
Reviewed-on: https://dart-review.googlesource.com/74665
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-09-12 21:33:27 +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
Paul Berry a8e042f705 Run more resolvers during one-phase resolution.
In two-phase resolution these resolvers aren't needed, because the AST
is partially resolved in the process of reconstituting it from the
unlinked summary.  For one-phase resolution we are just starting from
the raw unresolved AST so we need to resolve it fully.

Change-Id: I0068be592c61b6653806fa86ec30910ac8833294
Reviewed-on: https://dart-review.googlesource.com/74662
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-09-12 19:18:50 +00:00
Konstantin Shcheglov 2ede4c7543 Downgrade WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR to warning.
Per https://github.com/dart-lang/sdk/issues/34403#issuecomment-420465838
request.

R=brianwilkerson@google.com

Change-Id: I9a2c319d2262aacf14bfc180d59d16db3f199a2a
Reviewed-on: https://dart-review.googlesource.com/74560
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2018-09-12 19:11:26 +00:00
Konstantin Shcheglov b7de316b3d Fix for checking implemented general interfaces for mixins.
R=brianwilkerson@google.com

Change-Id: I8e430471c5a5b544c1c9d323376a92d125c3d81b
Reviewed-on: https://dart-review.googlesource.com/74660
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-09-12 19:07:34 +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 9764bac918 Update OutlineBuilder to handle class C with M
That is, when `extends S` is missing.

Also address comment in https://dart-review.googlesource.com/c/sdk/+/73940

Change-Id: Ieee7ae42bf1e63d40cab08044068b809ea1f474d
Reviewed-on: https://dart-review.googlesource.com/74016
Commit-Queue: Dan Rubel <danrubel@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2018-09-12 15:19:33 +00:00
danrubel 29847b8235 Improve analyer error code template matching
... and auto generate more Analyzer error codes

Change-Id: I8b6097685aad30d59e9513656581782819d5ce2e
Reviewed-on: https://dart-review.googlesource.com/74600
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2018-09-12 14:45:00 +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
danrubel 393583908a Improve fasta indexed assignment recovery
Fix https://github.com/dart-lang/sdk/issues/34214

Change-Id: I16ac09e433b14fc2300108ec8c90eed830121778
Reviewed-on: https://dart-review.googlesource.com/74522
Reviewed-by: Peter von der Ahé <ahe@google.com>
2018-09-12 11:10:56 +00:00