Commit Graph

150 Commits

Author SHA1 Message Date
Jaime Wren 38c0fb78b6 Completion bug fix - extended types will now be completable in extension declarations
Bug: https://github.com/dart-lang/sdk/issues/41665
Change-Id: I5e89babc7a52fa833ebd55398fca50b292c710da
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144980
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
2020-04-27 19:20:08 +00:00
Brian Wilkerson c980e5d876 Produce a completion location for the argument list in an extension override
Change-Id: I694d77dbba171fb0d4806933ce766c9d411dba21
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144664
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-04-23 19:30:19 +00:00
Brian Wilkerson 84beb4d31b Implement the element kind feature
In addition to implementing the feature, this CL updates one of the
contributors to use the new feature as a way of testing it. I haven't
looked to see whether it impacts the metrics, but I wouldn't expect much
change anyway because of the small number of completions that are likely
to be effected by this change.

It might be interesting to start thinking about ways to measure the
impact of individual features.

Change-Id: Idd0040a774e5fd9a6e3f6c29d0aa7fd762676fbe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143622
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Jaime Wren <jwren@google.com>
2020-04-16 14:33:24 +00:00
Brian Wilkerson 286501b0f1 Compute the completion location while computing the OpType
The completion location will be used later to help compute relevance
based on the element kind.

Change-Id: I3927bb0137340a81fc90efcbc9c3ecb25ad63542
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143240
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-04-13 17:06:01 +00:00
Jaime Wren c853f70fea Follow up on recent completion improvement in https://dart-review.googlesource.com/c/sdk/+/142545 to add a test in optype_test.dart
Change-Id: I72ad4a656e332facea7b396604aff765475ad122
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142706
Auto-Submit: Jaime Wren <jwren@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-04-07 20:56:16 +00:00
Jaime Wren eddc9271ab Suggest type names before names in FieldDeclarations, even when they are documented with dartdoc
Similar to https://dart-review.googlesource.com/c/sdk/+/142545

Change-Id: I217a17324bcfd9efb7e9bd1a53332fd06d1dc024
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142705
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
2020-04-07 20:53:46 +00:00
Brian Wilkerson 1e93347fc2 Clean up OpTypeTest
This merges the 3 concrete classes into a single class. We were not
really testing Dart 1 behavior, and the extension methods experiment is
enabled by default.

I also renamed several of the tests to conform more closely to the
convention we use.

I did not alter the bodies of any of the tests, so we're testing exactly
the same things after this CL as before.

In future CLs, as I add more information to OpType (for the new relevance
computations), I plan to subdivide the tests based on the type of the
AST node being tested, which will split up the tests and allow for shorter
test names.

Change-Id: I717c5697817d9f96d050318f2f39da85dff23422
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142203
Reviewed-by: Jaime Wren <jwren@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-04-02 18:28:29 +00:00
Jaime Wren 25c591e0b0 Additional optype constructor declaration tests as well as a minor bug fix in optype.dart.
This is follow up on https://dart-review.googlesource.com/c/sdk/+/142063

Change-Id: I39dcb9cbecf78e12cc364712345693e153110523
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142088
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
2020-04-02 06:11:40 +00:00
Jaime Wren 0c8158c3cd Fix missing type name completions in constructor declarations.
There are 34 instances of this in the package collection.

Change-Id: I43856f0e840ca3f76285948363868927b669caf6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142063
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
2020-04-01 20:58:28 +00:00
Brian Wilkerson 6f15530536 Enable omit_local_variable_types in analyzer_plugin
Change-Id: I908e15b4820eab0e8375994ce3cebfac332306f3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141581
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-03-30 04:06:49 +00:00
Konstantin Shcheglov b2acb51d30 Fix for completion in formal parameters of GenericFunctionType.
There was crash:

NoSuchMethodError: The getter 'offset' was called on null.
Receiver: null
Tried calling: offset
at Object.noSuchMethod	(dart:core )
at _OpTypeAstVisitor.visitSimpleFormalParameter	(optype.dart:976 )
at _OpTypeAstVisitor.visitFormalParameterList	(optype.dart:631 )
at FormalParameterListImpl.accept	(ast.dart:4479 )
at DartCompletionRequestImpl.opType	(completion_manager.dart:435 )

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

Change-Id: I0b0ef50e925ad48ca293a7a753b332821b503e5a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141320
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-03-27 17:02:34 +00:00
Konstantin Shcheglov 7079c49b05 Check for importedLibrary is null in importLibraryElement().
I see it in crashes sometimes.

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

Change-Id: I734d78f0e71c5985c7833fcf6e439fd4c48a5899
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139601
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-03-15 21:22:37 +00:00
Brian Wilkerson 3c50ff1f15 Remove some unused members from OpType
Change-Id: I79788bed588234a85080e840fba578e5a51d6928
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139304
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-03-12 18:51:46 +00:00
Brian Wilkerson 027f9588e1 Fix replace_null_with_closure when the parameter type has no parameter names (issue 40578)
Change-Id: Ie85294e1925a1d3880416ef4ceed86052e1534e7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138140
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-03-03 18:51:23 +00:00
Konstantin Shcheglov a7a2e7d4b1 Use parseString() API instead of internal Parser.
R=brianwilkerson@google.com

Change-Id: I5ded2637e084acccd0e6e646d4675aa929c9b6d9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137080
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-02-25 17:18:31 +00:00
Paul Berry b0b06bff31 Revert "Issue 37487. Add CompilationUnit.languageVersion override."
Reason for revert: it was a breaking change to the analyzer public API.

There were two breakages:

- A @required `languageVersion` parameter was added to
  AstFactory.compilationUnit, which is part of the officially
  supported analyzer public API.

- A @required `languageVersion` parameter was added to the Parser
  constructor, which is not part of the officially supported analyzer
  public API, but is part of its de facto public API due to the fact
  that it is used by dart_style.

This reverts commit ce26dfda7d.

Change-Id: I507103ea6f6ffabf915d6f56e9f24454725c3930
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136851
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-02-25 04:39:10 +00:00
Konstantin Shcheglov ce26dfda7d Issue 37487. Add CompilationUnit.languageVersion override.
Bug: https://github.com/dart-lang/sdk/issues/37487
Change-Id: I57fbcdd6771d9004ba1fc43902c19514dab2a23d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136802
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-02-21 20:19:43 +00:00
Konstantin Shcheglov 738ad286d7 Use DartType.getDisplayString() instead of toString().
Change-Id: I97059ac709bc46347f97fd951d839985ab12d62b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134481
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-02-05 07:33:21 +00:00
Brian Wilkerson 7494f58032 Enable always_declare_return_types in analyzer_plugin
Change-Id: I972f0e2569de64397828d887b1fb37fcf57e006f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133408
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-01-26 23:13:34 +00:00
Brian Wilkerson f34a25099b Enable slash_for_doc_comments in analyzer_plugin
Change-Id: I9cafff7fcbf6c8930e3ac8ddba05061601aa8223
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/132452
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-01-18 18:17:31 +00:00
Brian Wilkerson ac8a2a657a Enable avoid_init_to_null in analyzer_plugin
All changes other than the analysis options file were made by dartfix.

Change-Id: I4c034327b39f938965c69e6eb504b8dc50267975
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131320
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-01-12 22:54:24 +00:00
Brian Wilkerson 32ce9c7872 Enable prefer_collection_literals in three packages
Other than the following changes, all of the changes were made by dartfix:
- the analysis options files
- one line to enable the fix through dartfix (missed in an earlier CL)
- three places where a bug in the fix produced invalid code (issue and fix TBD)

Change-Id: If8660700792561805f4d1c96ccecd81abcebfeb8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131209
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-01-11 20:39:02 +00:00
Konstantin Shcheglov 39f14a000e Rewrite most getDisplayString() to ElementDisplayStringBuilder.
R=brianwilkerson@google.com

Change-Id: I500d0045873a12d550d9ffe302e066a63ba56660
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130221
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-01-06 16:43:40 +00:00
Brian Wilkerson fbadd6a832 Enable prefer_equal_for_default_value in several packages
Other than the changes to the code generators and analysis options files,
all of these changes were produced using dartfix.

Change-Id: I24f47b9f6b929b0b5d5e08da7ef2016f4bdc4108
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130260
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-01-05 20:59:19 +00:00
Brian Wilkerson 7d41ae7d15 Enable unnecessary_this in several packages
Change-Id: I743066d66dbf1dff984e8f8bf5b7a472c9bc7ff7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129821
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-12-28 20:43:16 +00:00
Brian Wilkerson 03c33360b7 Remove unnecessary uses of new in analyzer_plugin
Other than
- the change to enable the lint (in analysis_options.yaml) and
- updates to the generator (in tool) to stop generating 'new',
all of the changes were generated by dartfix.

Change-Id: I9d14b99ab748ef5b80f8800a802e20100eee04a1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128577
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-12-17 20:12:05 +00:00
Brian Wilkerson 674810a38d Generated overriding methods throw an exception rather than returning null
Change-Id: I4e0b19b4773e557b8e31583c4ad110ad79a3e426
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/126361
Reviewed-by: Danny Tuppeny <dantup@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-11-26 18:00:09 +00:00
Konstantin Shcheglov 273ca5858b Deprecate AnalysisContext.typeProvider/typeSystem
Change-Id: I5235aa38bcde93618a10b88da9ad6a8c3e5dc29c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/126141
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-11-25 22:00:47 +00:00
Konstantin Shcheglov 6294c73f3e Deprecate 'typeSystem' parameter for InheritanceManager3.
Change-Id: If14eb8900b0fb5cac5e49cf865f2e6e3a0a0263d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/126083
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-11-22 23:08:41 +00:00
Konstantin Shcheglov 615928c514 Stop referencing non-API TypeSystem in analyzer.
Replace it with TypeSystem from lib/dart/element/type_system.dart,
or (internally) with TypeSystemImpl.

We keep the old TypeSystem where its is exposed from API:
- ResolveResult.typeSystem
- AnalysisSession.typeSystem
- AnalysisContext.typeSystem

  We will make changes to these as a breaking change later.

Change-Id: I40ca53ea77e440457c6d0f3832ec3b6286bacdf0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125770
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-11-21 01:09:24 +00:00
Konstantin Shcheglov 595022bdea Remove summary1, part 1.
Change-Id: I557785ac13fa411280ce032324b0305bf25a0a6d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119170
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-28 14:30:05 +00:00
Konstantin Shcheglov 6a9d792454 Move NullabilitySuffix to API.
R=brianwilkerson@google.com

Change-Id: I58547075d3472e6708e6b5ff1c6d89f768aba66a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117440
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-16 21:14:11 +00:00
Konstantin Shcheglov f470695875 Stop using ClassElement/TypeParameterElement.type in tests.
There are 4 references to `type` left in tests, because it looks
that these tests validate peculiarities of the `type` getter itself.
I will remove them later, when the production code is off `type`.

R=brianwilkerson@google.com

Change-Id: I4b8a590e561fe3d3103500b097c13d989514976e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117280
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-16 15:53:29 +00:00
Brian Wilkerson 25edeb7ae1 Support completing the extension name locally
Change-Id: I49174918ca84f2aaafe4b47200e9396f2191a727
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116802
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-09-11 21:42:26 +00:00
Konstantin Shcheglov 4f8f592b51 Remove adding prefixes for auto imports.
Adding import prefixes often has false positives.
At this point I think that this feature does more harm than benefit.

R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/38326
Change-Id: I99e3400aebc062d9de3c298d7ed58520534d061c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116746
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-11 19:04:47 +00:00
Brian Wilkerson eb60f0531e Support a fix to add a setter, both in extensions and elsewhere
Change-Id: I94d7ec13a2bcf73b120be18facf473a4710a6e28
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116053
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-09-06 21:59:14 +00:00
Konstantin Shcheglov 8022f885af Stop using TestTypeProvider in analyzer_plugin.
R=brianwilkerson@google.com

Change-Id: Idfc57043d72793858805aed745db02c1740df28a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116081
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-06 19:01:29 +00:00
Konstantin Shcheglov b6897ea094 Stop using resolutionMap in analyzer and analysis_server.
R=brianwilkerson@google.com, paulberry@google.com

Change-Id: Ie8f75e330e9efee67ded892929a3d78b7de1c586
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114565
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-08-26 23:18:54 +00:00
Konstantin Shcheglov 04bd34ed87 Issue 37916. The name of ConstructorName cannot be shadowed.
R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/37916
Change-Id: I905e0b9ebfa4514f9a7f28555f95a2154bcf2f04
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113846
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-08-20 18:31:41 +00:00
Konstantin Shcheglov 6408a9cc4d Tweaks for writeType() and summary2.
R=brianwilkerson@google.com

Change-Id: If3c682f3dfc12a9e13d805bc25476b16249c7754
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113273
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-08-17 07:28:52 +00:00
Brian Wilkerson 802937e5a6 Add support for completions inside extension (and mixin) bodies
Change-Id: I549e91ac7a8e293ea6592043988a67a2da680620
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113133
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
2019-08-15 16:39:05 +00:00
Konstantin Shcheglov 1a0fe21fb2 Add ExecutableElement(s) based InheritanceManager3, and switch analyzer to it.
This reverts commit b8614ca613.

Change-Id: Ic31ee323b21311d8a89f50bcb533316eb55f75e9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110941
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2019-07-29 19:02:24 +00:00
Paul Berry b8614ca613 Revert InheritanceManager3 changes.
These changes were inadvertenly rolled out in a way that breaks
clients, so we need to stage them out more gradually.  See discussion
at
https://dart-review.googlesource.com/c/sdk/+/110552/2/pkg/analyzer/lib/src/generated/resolver.dart#3768

This reverts commit 5b5ddeda92.
This reverts commit e76879acc4.
This reverts commit 27bec56744.

Change-Id: Ic80a577b1cdc4a6c89ca06afceae01af6621d3e5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110841
Auto-Submit: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-07-28 13:54:09 +00:00
Konstantin Shcheglov 27bec56744 Add ExecutableElement(s) based InheritanceManager3, and switch analyzer to it.
Initial: 5d6bab4ed2.
Reverted: 39afa4e555
Change-Id: If611f96e6b0156ec218831dd64305e6ccf02e312
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110552
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-07-26 16:16:11 +00:00
Konstantin Shcheglov b0463ea7e0 Add DartFileEditBuilder.format(SourceRange)
R=brianwilkerson@google.com

Change-Id: I65228f586119385e32d944d608cf21b6bd0dae87
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/109549
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-07-18 20:18:22 +00:00
Konstantin Shcheglov c1d3bf8506 Issue 36890. Ignore the name that contains the caret during completion.
The previous implementation worked fine in tests, when we asked for
completion where the user does, but that's not what happens during
actual completion. Actually the 'offset' is at the start of the
identifier.

R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/36890
Change-Id: I5ceaff055580a18fe34d2c17ccacef8f4c7663b3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108282
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-07-08 17:03:32 +00:00
Konstantin Shcheglov d63466041c Issue 131596231. Suggest names for SimpleFormalParameter(s).
R=brianwilkerson@google.com, jwren@google.com

Change-Id: I9074ef1a5aaeee32303dcf247c2be86f9c173d14
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/104460
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Jaime Wren <jwren@google.com>
2019-06-03 17:34:18 +00:00
Brian Wilkerson 2e51423c3d Convert the way function types are displayed to better match the syntax of Dart
Change-Id: Id5068bd52b3a35c70cb0d2ccc735469e2f8a0d3b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103701
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-05-28 20:48:51 +00:00
Konstantin Shcheglov 58f3098650 Issue 36890. Improve importing elements when incomplete code.
There might be some false negatives, when there *is* another top-level
declaration with the same name as we are removing. But this is a
pre-existing conflict, so I think we should not be very concerned. At
some point we might collect initial potentially conflicting names using
the same SyntacticScopeNamesCollector instead of element model. With
element model we don't know about parser recovery.

R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/36890
Change-Id: Ia05db299990f41f16feb493c2812237be84f3d2e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101902
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-05-08 23:31:49 +00:00
Paul Berry e2d0f5a50b Add featureSet parameter to Parser constructor.
And deprecate old parser configuration setters.

Change-Id: Ib1507b8d2b20be7c883061e2a92ec9205d6a378f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100664
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-04-29 16:42:19 +00:00