Commit Graph

2889 Commits

Author SHA1 Message Date
Konstantin Shcheglov d5038fc976 Stop using FileContentOverlay in RuntimeCompletionComputer and AbstractContextTest.
RuntimeCompletionComputer still is not good to work with AnalysisSession,
but now does not use the deprecated API.

R=brianwilkerson@google.com

Change-Id: I07f5e496c6f268c4d213ebb3794fa214b437f21e
Reviewed-on: https://dart-review.googlesource.com/c/92525
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-02-09 22:26:19 +00:00
Paul Berry ad3adb6285 Move nullability migration algorithm into analysis server.
Change-Id: Ie240b42cab37e3f5adce8633d368fcf6667b3a37
Reviewed-on: https://dart-review.googlesource.com/c/92522
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-02-09 19:01:14 +00:00
Brian Wilkerson 5787f08619 Clean up some hints in server and analyzer
Change-Id: Ia6bb5e4e4e398dbed29fe6649c490a88d4e0a406
Reviewed-on: https://dart-review.googlesource.com/c/92523
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-02-09 17:58:44 +00:00
Konstantin Shcheglov 5f3ed76854 Issue 3172. When adding a required argument, create a linked group for the default value.
R=brianwilkerson@google.com

Bug: https://github.com/flutter/flutter-intellij/issues/3172
Change-Id: I991b7d6a1094691d2a005786cb5bbc507a1004c9
Reviewed-on: https://dart-review.googlesource.com/c/92520
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-02-09 17:30:35 +00:00
Konstantin Shcheglov 67c5923cce Enhance protocol to allow changing relevance of individual suggesions.
R=brianwilkerson@google.com

Change-Id: I3f3d256fcdc4d41c527bbc03fb71800583a264f7
Reviewed-on: https://dart-review.googlesource.com/c/92382
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Ari Aye <ariaye@google.com>
2019-02-08 19:25:05 +00:00
Paul Berry afe37d7fe0 Add migration support for named parameters (with and without default values).
At this point the migration tool is beginning to make assumptions
about decisions the language team hasn't made yet, so I've created a
class to document those assumptions and allow us to test variants.

Change-Id: I4638d7f534cfa2dbd8460277351045c370377ff8
Reviewed-on: https://dart-review.googlesource.com/c/92394
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-02-08 17:47:55 +00:00
Konstantin Shcheglov 69d0411768 Fix exception when completion is requested not in a Dart file.
R=brianwilkerson@google.com

Change-Id: I3b24631dd4dec7124b7be13cc0618c289985476c
Reviewed-on: https://dart-review.googlesource.com/c/92389
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-02-08 17:10:45 +00:00
Paul Berry 5b7b34eb3a Add a "permissive mode" to the nullability migration tool.
This allows us to try it out on substantial codebases (e.g. the
analyzer itself) without crashing, even though a lot of the underlying
logic is not yet complete.

Change-Id: I24a45eea1889f7d9afa30c0398f359d32ffb52ad
Reviewed-on: https://dart-review.googlesource.com/c/92404
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-02-08 13:23:35 +00:00
danrubel 21b596e1b1 Change NullabilityFixKind from enum to class
... so that it can carry additional information
such as an applied message for use by dartfix.

Change-Id: Ic98f4000590c9bf21be45c5a5139946afeeb196c
Reviewed-on: https://dart-review.googlesource.com/c/92302
Commit-Queue: Dan Rubel <danrubel@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2019-02-07 20:47:37 +00:00
danrubel d84ec89f39 add NullabilityMigrationListener for communicating changes to the client
Change-Id: If6c9cefd0f43edab3a6731f606b4be9a0934e540
Reviewed-on: https://dart-review.googlesource.com/c/92242
Reviewed-by: Paul Berry <paulberry@google.com>
2019-02-07 20:47:37 +00:00
danrubel 9f0301630f Update dartfix NNBD to use 2-pass analysis
Change-Id: Icc7c1b29c6abeed968372c3a7442fdcecda0e572
Reviewed-on: https://dart-review.googlesource.com/c/92152
Reviewed-by: Paul Berry <paulberry@google.com>
2019-02-07 20:47:37 +00:00
Konstantin Shcheglov 70283bdb3a Improve choosing context for changes files.
This should fix the Windows bot failure in Analysis Server.

R=brianwilkerson@google.com

Change-Id: I50cc69f7c0f60d955d8bb96cacc740e2d0c8d45e
Reviewed-on: https://dart-review.googlesource.com/c/92304
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-02-07 20:43:40 +00:00
Konstantin Shcheglov 073f557b1a Temporary fix for Analysis Server tests on Windows.
This requires a biggest fix in the declarations tracker, we need to
improve the way we find changed file URIs.

R=brianwilkerson@google.com

Change-Id: I5332434102525fa6730d17605fe1e466f6d397e5
Reviewed-on: https://dart-review.googlesource.com/c/92300
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-02-07 17:02:21 +00:00
danrubel 3afc3b58d0 Add dartfix protocol integration tests
... and address comments in https://dart-review.googlesource.com/c/sdk/+/91780

Change-Id: Ibd01a0de575065cf18822b806a9c687de2667add
Reviewed-on: https://dart-review.googlesource.com/c/92243
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-02-07 06:21:57 +00:00
Konstantin Shcheglov 67a1ce6b34 Notify DeclarationsTracker about file changes.
R=brianwilkerson@google.com

Change-Id: Iedbd695a184cefb384195ac56cffcf34c17806e7
Reviewed-on: https://dart-review.googlesource.com/c/92154
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-02-07 02:03:17 +00:00
Paul Berry c2cdc1c639 Allow migration of multiple files at once.
Change-Id: I1940ab2da69327132eb71fbd839b9ac726dc7529
Reviewed-on: https://dart-review.googlesource.com/c/92240
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-02-07 00:02:04 +00:00
Paul Berry d68d8526f4 Allow nullabilty migration prepareInput/processInput to operate on different ASTs.
This required modifying the implementation of nullability migration so
that it no longer holds onto AST nodes, but instead records sources
and offsets.  This will allow the tool to scale to large projects
since the AST for one file can be garbage collected while the AST for
another file is analyzed.

Additional changes:

- provisional_api_test.dart is updated so that it tests the API in two
  ways: once feeding identical ASTs to prepareInput/processInput, and
  once feeding conceptually equal (but not identical) ASTs.

- The internal analyzer API is changed so that the finish() method
  simply returns a list of modifications, rather than a map from path
  to modification list.

- Files are tracked by Source rather than by path.

- Modification objects remember their Source (this should pave the way
  for allowing multiple files to be migrated in a single run of the
  tool).

- The Variables class is split in two, with the methods needed for
  testing in a private class inside migration_test.dart.  These test
  methods can retain pointers to AST nodes without creating
  scalability problems for the production code.

Change-Id: Idd3f3b6893a25bb4294b4b4c820e20e4bc47ffd8
Reviewed-on: https://dart-review.googlesource.com/c/92220
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-02-06 23:58:40 +00:00
Paul Berry ba9fbda83e Rework provisional migration API.
Instead of returning a list of SourceFileEdit objects, we now return a
list of SingleNullabilityFix objects.  Each SingleNullabilityFix can
be queried to determine (a) which source file it applies to, (b) the
exact set of source edits to apply, and (c) the kind of change.
Future CLs will add the ability to query (d) the location of the
change, and (e) the reason for the change.

Change-Id: I5a42958ac70d1e39802efd5915d0856109b4a7db
Reviewed-on: https://dart-review.googlesource.com/c/92151
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-02-06 23:20:41 +00:00
Brian Wilkerson df779789f2 Support two more cases in the convert-to-spread assist (issue 35867)
Change-Id: I3762df7627045af3e023037aef1109afefb176ff
Reviewed-on: https://dart-review.googlesource.com/c/92165
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-02-06 21:36:01 +00:00
danrubel caa8747a37 Rework dartfix NNBD fix to use new NullabilityMigration engine
... add address comment in https://dart-review.googlesource.com/c/sdk/+/92082

Change-Id: Id9b400522e8c9af3d04ca5524174a61a8045d9d7
Reviewed-on: https://dart-review.googlesource.com/c/92141
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-02-06 19:49:35 +00:00
Konstantin Shcheglov ae5bd68570 Lower relevance of deprecated suggestion sets.
R=brianwilkerson@google.com

Change-Id: I3b10c74d815c69f120238a6fd5028ae534fc7446
Reviewed-on: https://dart-review.googlesource.com/c/92142
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-02-06 19:38:30 +00:00
Konstantin Shcheglov 033cb7ffcc Issue 1438. Use expression function body for createState().
R=brianwilkerson@google.com

Bug: https://github.com/Dart-Code/Dart-Code/issues/1438
Change-Id: Id68e047233722d35b0ff4c08a8244d53c8e26e81
Reviewed-on: https://dart-review.googlesource.com/c/92101
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-02-06 17:02:41 +00:00
danrubel 512e2ef292 Extract FixCodeTask/Processor from main dartfix class
Change-Id: Ieb8c52c1908521f77c6a5a13809fbe5636ee5b5a
Reviewed-on: https://dart-review.googlesource.com/c/92082
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-02-06 16:45:05 +00:00
danrubel 5ae156e055 Extract DartFixListener to record source changes and recommendations
... and add DartFixRegistrar in preparation for extracting tasks
from the main dartfix class.

Change-Id: I6423a474fc5d94d766d9b219fb31a4263db28d1b
Reviewed-on: https://dart-review.googlesource.com/c/92064
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-02-06 16:44:45 +00:00
Paul Berry efcf8b01b1 Move integration tests of migration API to analysis server.
Change-Id: I7109df482f17be884a31313e18e1b4cf57b1ad4c
Reviewed-on: https://dart-review.googlesource.com/c/92140
Auto-Submit: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-02-06 15:37:18 +00:00
Paul Berry 4fb220707e Hardcode SourceFileEdit.fileStamp to -1 in migration prototype.
SourceFileEdit.fileStamp isn't used anymore, so there's no reason to
have extra plumbing to set it.

Change-Id: I1d1c8e9e74f74d19fd306d44e477573de5a66cd7
Reviewed-on: https://dart-review.googlesource.com/c/92061
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-02-06 13:10:48 +00:00
Brian Wilkerson ceb7b89df1 Remove a fix that has now been replaced by an assist
Change-Id: Ifa6ca5b97474ae770c81241e569f6763cdc32a29
Reviewed-on: https://dart-review.googlesource.com/c/92060
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-02-05 20:37:05 +00:00
danrubel db9e3f21c9 remove InconsistentAnalysisException guard code from dartfix
This updates the dartfix tests to align with how the dartfix API
is implemented and is being used, and removes the now unnecessary
InconsistentAnalysisException guard code.

Change-Id: Id7230ecec4940097fd0f2d3c034f47262ddc94b5
Reviewed-on: https://dart-review.googlesource.com/c/91962
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-02-05 19:01:55 +00:00
Konstantin Shcheglov d236dca9d9 Add 'offset' to 'getSuggestionDetails'.
We need it to know if names in the syntactic scope will shadow
the requested name if unprefixed import is used.

R=brianwilkerson@google.com

Change-Id: I1fd28add9241b27795160c4705a80e0f8aa6c647
Reviewed-on: https://dart-review.googlesource.com/c/92022
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-02-05 16:49:55 +00:00
Paul Berry 3395550962 Provisional nullability migration API in analysis_server.
Limitations at this point:

- Only one file can be migrated at a time.  If you try to migrate more
  than one file, you will get an assertion failure.

- The ResolvedUnitResult passed to prepareInput must contain precisely
  the same unit (in terms of `identical`) as the ResoledUnitResult
  passed to processInput.  Otherwise you will get an assertion
  failure.

- There is not yet any way to query diagnostic information about the
  migration (e.g. heuristic decisions that were made).

- Only a very small number of constructs can be successfully migrated
  at this point.

- The implementation is not sensibly organized at this point.  Most of
  it is in the analyzer, and then wrapped in the analysis_server.
  Really it all should go in the analysis_server.

I'll be working to rectify these limitations over the next few days,
which will probably involve a lot of rework under the hood.  But
hopefully the API in provisional_api.dart should remain stable, so
that DartFix code can start being written against it.

Change-Id: Idc3ebab380448a812d5e83338789570e33c55af7
Reviewed-on: https://dart-review.googlesource.com/c/92020
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
Auto-Submit: Paul Berry <paulberry@google.com>
2019-02-05 16:30:35 +00:00
Brian Wilkerson 102f3074d5 Enhance assist to convert invocation of LinkedHashMap to a map literal
Change-Id: I31c0533ab545734386a5ec8759d7a20abb3b53a0
Reviewed-on: https://dart-review.googlesource.com/c/91980
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-02-05 15:19:35 +00:00
Konstantin Shcheglov 3e5ed47777 Implement 'completion.getSuggestionDetails'.
R=brianwilkerson@google.com

Change-Id: I7b1fafe7ee2c6442fab0f7a83b3fa4315488e95a
Reviewed-on: https://dart-review.googlesource.com/c/91900
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-02-04 18:03:00 +00:00
Konstantin Shcheglov 8c891ec25e Include type parameters into suggested code completions.
R=brianwilkerson@google.com

Bug: https://buganizer.corp.google.com/issues/120659839
Change-Id: I51ec6142b97b079c4db55ef1f2081354ee16dda5
Reviewed-on: https://dart-review.googlesource.com/c/91858
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-02-04 05:37:37 +00:00
Konstantin Shcheglov 133d83eede Protect against override completion outside workspace.
R=brianwilkerson@google.com

Bug: https://buganizer.corp.google.com/issues/123774694
Change-Id: I9f5aa93a86c0d1a0c496cd77853314a23a1aedbe
Reviewed-on: https://dart-review.googlesource.com/c/91853
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-02-03 17:27:16 +00:00
Konstantin Shcheglov 849285276d Extract and migrate ElementLocator tests.
R=brianwilkerson@google.com

Change-Id: I10914580c96daee9bae8794db477c6413a089c09
Reviewed-on: https://dart-review.googlesource.com/c/91850
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-02-03 17:26:46 +00:00
Brian Wilkerson 53ba159aa4 Add assists to convert to list, map and set literals
Change-Id: If8909859ea9c8752ecf0ea05b89f4a27d373fb39
Reviewed-on: https://dart-review.googlesource.com/c/91846
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-02-02 22:00:55 +00:00
Brian Wilkerson af303a277c Add some assists for the code-as-ui features
Change-Id: Ie01b1875fb35eab1427b2869f9c009a06c048412
Reviewed-on: https://dart-review.googlesource.com/c/91841
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-02-02 17:37:55 +00:00
Konstantin Shcheglov 460d69d08f Update 'Convert to StatefulWidget' to create private State classes.
R=brianwilkerson@google.com

Bug: https://github.com/Dart-Code/Dart-Code/issues/1438
Change-Id: I9415423f6d80e5d91165a796ec2bc9d86522d56f
Reviewed-on: https://dart-review.googlesource.com/c/91842
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-02-01 22:58:45 +00:00
Konstantin Shcheglov 931051814c Partial implementation of the 'available suggestion sets' protocol.
R=brianwilkerson@google.com

Change-Id: I856b6a39c2464caf6750e0b0abb0cfa29311e97c
Reviewed-on: https://dart-review.googlesource.com/c/91769
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-02-01 17:55:27 +00:00
danrubel 1c173c2ce7 Enhance dartfix to allow including and excluding specific fixes
This add several options to the dartfix command line
so that only specific fixes can be applied rather than all fixes.

Fix https://github.com/dart-lang/sdk/issues/35539

Change-Id: I8bb89696b0b47a291ed22aa00d4787f3ea5aa4be
Reviewed-on: https://dart-review.googlesource.com/c/91780
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-02-01 16:55:17 +00:00
lambdabaa d4b8e0696d Add the capability in analysis server protocol for clients to express
interest in receiving not yet imported code completions from specific
packages and libraries.

The design of this interaction aims to avoid forcing analysis server
to send every public symbol from dependent packages at every completion.
Instead, clients express interest in certain packages and/or libraries
and analysis server will notify with the entire set of symbols for
each of them only once. Then it is the client's responsibility to save
these pre-computed completions in memory, and analysis server can
instruct the client on how to union them with the base set of completion
suggestions at code completion time.

Bug: https://github.com/dart-lang/sdk/issues/35680
Change-Id: I42c6fddc5d8daa2b546daa81456c0992e3ef547d
Reviewed-on: https://dart-review.googlesource.com/c/90125
Commit-Queue: Ari Aye <ariaye@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-01-31 19:56:18 +00:00
Konstantin Shcheglov e5164be27e Issue 35127. Fixes for mixin implements / overrides.
R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/35127
Change-Id: I5869175cee13b6e22ce25c2d361b0b1aa52efe48
Reviewed-on: https://dart-review.googlesource.com/c/91690
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-01-31 16:01:55 +00:00
Konstantin Shcheglov 485a41bb12 Include superclass constraints into mixin type suggestions.
R=brianwilkerson@google.com

Bug: https://buganizer.corp.google.com/issues/123231336
Change-Id: I0e1ce9a332f47211ef2614ae73009433d1839ba0
Reviewed-on: https://dart-review.googlesource.com/c/91691
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-01-31 15:12:15 +00:00
danrubel db44a727e5 Extend the edit.dartfix protocol
This CL extends the dartfix protocol to allow specifying which
fixes should be applied. In summary:

* includedFixes - list of fix names to be applied
* includeRequiredFixes - bool indicating required fixes should be applied
* excludedFixes - list of fix names that should not be applied

Given that the client can specify the fixes to be included/excluded,
then the dartfix cmdline help text should include the list of known fixes.
Rather than hard code this in the dartfix client, a new edit.getDartfix
request has been added to return the list of known fixes.

Change-Id: I319f6f405a5d29757bf28b70b778a449f901bbef
Reviewed-on: https://dart-review.googlesource.com/c/91700
Commit-Queue: Dan Rubel <danrubel@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-01-31 01:53:32 +00:00
Konstantin Shcheglov b8fc017778 Replace convertAbsolutePathToUri() with toUriStr().
Change-Id: Ib34247ce7457ada7e4705714984034387f09a80c
Reviewed-on: https://dart-review.googlesource.com/c/91684
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-01-30 20:47:56 +00:00
Konstantin Shcheglov b196cd2acb Issue 34437. Restore checking that optional parameters in derived classes should have the same default values as overridden.
Downgrade INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_NAMED and INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_POSITIONAL to warnings.

Bug: https://github.com/dart-lang/sdk/issues/34437
Change-Id: I4399839e04135a5d9a557c0ab06f319d9759af23
Reviewed-on: https://dart-review.googlesource.com/c/91460
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-01-29 22:35:15 +00:00
Dan Rubel 09e6a689c2 parse nested control flow collection entries
Change-Id: Id50c0a53a51f076dd75dd5bc13a694663449bc83
Reviewed-on: https://dart-review.googlesource.com/c/91400
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-01-29 17:53:58 +00:00
Konstantin Shcheglov 1ba59eb13d Make ERROR the default severity for StaticWarningCode. Remove _StrongModeTypeErrorProcessor.
As a preparatory step for re-landing https://dart-review.googlesource.com/c/sdk/+/91170
and making these two restored problems to warnings.

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

Change-Id: I6266632ade84743b5725c54475fe402902576c00
Reviewed-on: https://dart-review.googlesource.com/c/91420
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-01-28 22:08:17 +00:00
Paul Berry ec5ba8a252 Revert "Issue 34437. Restore checking that optional parameters in derived classes should have the same default values as overridden."
This reverts commit 6699384ddd.

Reason for revert: Breakages in Flutter - see https://logs.chromium.org/logs/dart/buildbucket/cr-buildbucket.appspot.com/8923238548150736816/+/steps/analyze_flutter/0/stdout

Original change's description:
> Issue 34437. Restore checking that optional parameters in derived classes should have the same default values as overridden.
> 
> R=​brianwilkerson@google.com, paulberry@google.com
> 
> Bug: https://github.com/dart-lang/sdk/issues/34437
> Change-Id: Ic54d2e074bc764376f970c9c29ba260e7a373d93
> Reviewed-on: https://dart-review.googlesource.com/c/91170
> Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>

TBR=paulberry@google.com,scheglov@google.com,brianwilkerson@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: https://github.com/dart-lang/sdk/issues/34437
Change-Id: I07c96c8131c16b2748a403f38d5f15b814131c63
Reviewed-on: https://dart-review.googlesource.com/c/91360
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-01-28 17:09:24 +00:00
Konstantin Shcheglov 69af7af70d Additional tests for interpolation and CONVERT_TO_MULTILINE_STRING.
For discussion in https://dart-review.googlesource.com/c/sdk/+/91262

R=brianwilkerson@google.com

Change-Id: Ib25a5da32ade4d4bccef8856867761e153a6d5dc
Reviewed-on: https://dart-review.googlesource.com/c/91263
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-01-28 15:08:06 +00:00