Commit Graph

6070 Commits

Author SHA1 Message Date
Konstantin Shcheglov f21fafd411 Migrate SimpleResolverTest from task model.
R=brianwilkerson@google.com

Change-Id: Icb45287e7f63f5139468eed5b84c45822f6da5ed
Reviewed-on: https://dart-review.googlesource.com/c/92846
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-02-12 23:14:22 +00:00
Paul Berry 1e72e9c985 Fix tests now that set literal support is enabled by default.
Fixes #35870.

Change-Id: Ie250961f12a720a4ffbfc114df55a18518bf0426
Reviewed-on: https://dart-review.googlesource.com/c/92864
Commit-Queue: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Auto-Submit: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-02-12 22:23:51 +00:00
Konstantin Shcheglov f841096701 Fix for crash if MixinDeclaration has a const constructor.
R=brianwilkerson@google.com

Bug: https://buganizer.corp.google.com/issues/124304191
Change-Id: I78f07338c3ac4c254986fb2b19a00bb5fd4201b7
Reviewed-on: https://dart-review.googlesource.com/c/92860
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-02-12 22:16:12 +00:00
danrubel 3f96de7855 Cleanup intermediate control flow collection structures in AstBuilder
Change-Id: I8aed607943dea39e5fe393ddf5f5ca00eddb1b42
Reviewed-on: https://dart-review.googlesource.com/c/92840
Commit-Queue: Dan Rubel <danrubel@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-02-12 21:48:28 +00:00
Konstantin Shcheglov 80e85d06ab Fixes for enum constants in available declarations.
R=brianwilkerson@google.com

Change-Id: Ic1ad3846ecf82cdd5f1f0b0d0d5a69b0d5c43d81
Reviewed-on: https://dart-review.googlesource.com/c/92763
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-02-12 17:43:58 +00:00
Brian Wilkerson 5fe0202b0b Unify MapElement and CollectionElement
Change-Id: Ia1be138d656d07bdf4c11640b79044abbc798986
Reviewed-on: https://dart-review.googlesource.com/c/92762
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2019-02-12 17:10:58 +00:00
Danny Tuppeny f54650ccaf Add LineInfo to Declaration search results
This allows LSP to translate locations to line/col ranges without re-requesting the LineInfos.

Change-Id: I59fab4d9f9de123deefd02a901ab4cc34ef8c0fb
Reviewed-on: https://dart-review.googlesource.com/c/92680
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Danny Tuppeny <dantup@google.com>
2019-02-12 15:16:45 +00:00
Paul Berry ce91bcb442 Add migration support for named parameters.
Currently assuming that the language team chooses option 2 for
https://github.com/dart-lang/language/issues/156#issuecomment-460525075.

To handle the case where the user does not specify a default value,
and all call sites supply the named parameter, there are two possible
heuristics:

- assumeNullable: mark the parameter as nullable, since the implicit
  default is `null`, even though the implicit default is never used.

- assumeRequired: consider the parameter to be `@required`, ensuring
  that the implicit default will never be used.

I've provisionally chosen `assumeRequired` as the default behavior.

Functionality not yet implemented:

- If `@required` is already present in the source code, this should
  override the heuristic; also it should not be added again.

- If the parameter is already marked as nullable in the source code,
  this should override the heuristic.

- Uses of `@required` should be translated to `required`.

- If `@required` is already present in the source code, and a default
  value is supplied, the default value should be removed.

- If the parameter is used in a way that demonstrates it was intended
  to be non-nullable (i.e. it appears in a place in unconditional
  control flow that would cause an exception to be thrown if it was
  null), this should override the heuristic and cause it to be marked
  as `@required`.

Change-Id: I9f2ec63787fdb6215e6075ecfcc830ed9942b8b5
Reviewed-on: https://dart-review.googlesource.com/c/92532
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-02-12 14:49:14 +00:00
Konstantin Shcheglov 71e8588399 Include enum constants into available declarations.
R=brianwilkerson@google.com

Change-Id: I86c525981119a77ad8b69878f8134d927f873817
Reviewed-on: https://dart-review.googlesource.com/c/92662
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-02-12 01:04:34 +00:00
Konstantin Shcheglov 3de72ae066 Added files, when in a context root, should be accessible through getLibraries().
R=brianwilkerson@google.com

Change-Id: I6d36ac4bed51b6e40307d2821780bb3fb08d540d
Reviewed-on: https://dart-review.googlesource.com/c/92624
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-02-11 21:04:44 +00:00
Sam Rawlins 25cefbdad7 Add HintCode.INVALID_VISIBILITY_ANNOTATION. Fixes #35141
Bug: https://github.com/dart-lang/sdk/issues/35141
Change-Id: Ifa8401e4ab772390c94d03a485ed7d07f43aff55
Reviewed-on: https://dart-review.googlesource.com/c/92660
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2019-02-11 19:06:28 +00:00
Mike Fairhurst a988ed06bd [analyzer] Fix off-by-one-error in experiments
Change-Id: I5c9710c7e6ea737b68f8c694ba6cde1690b74d2a
Reviewed-on: https://dart-review.googlesource.com/c/92566
Auto-Submit: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2019-02-11 16:16:29 +00:00
Brian Wilkerson a5c53b03cd Convert more doc comments from block to line style
Change-Id: I62fe9b25fb91518bd054c41688bdff0effbe830b
Reviewed-on: https://dart-review.googlesource.com/c/92540
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-02-11 06:35:32 +00:00
Brian Wilkerson 00ee3159e5 Convert interfaces to use implements not extends
Change-Id: Ia49fb8aefe7eb096ab8c8365a77337155c3c473a
Reviewed-on: https://dart-review.googlesource.com/c/92535
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-02-10 19:31:27 +00:00
Konstantin Shcheglov 5f2d651d94 Move FindElement to analyzer/src/test_utilities/.
R=brianwilkerson@google.com, paulberry@google.com

Change-Id: I3f376728ffe7fa49f50b8265359d637fca07ca57
Reviewed-on: https://dart-review.googlesource.com/c/92530
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-02-10 16:44:38 +00:00
Mike Fairhurst 5f79c9f4d1 Move UNCHECKED_NULL to error verifier.
Main risk in this CL is that it deviates from the void work which I'm confident is exhaustive.

Particularly, operators on void are caught by the resolver as a special kind of missing method, hopefully I put all the syntactic checks in at all the necessary places.

I also hardcoded "toString()," "hashCode." I previously had hardcoded to allow "==" checks, however, the code in ErrorVerifier was tripping over that. So now it should be good.


Change-Id: I56abb0219feb7aa143159694b688be15ba29015c
Reviewed-on: https://dart-review.googlesource.com/c/92063
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-02-09 23:26:49 +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
Paul Berry 9103baf31c Move find_node into test_utilities so that it can be re-used in analysis server tests.
Change-Id: I9a302944ccc96b04a64508cc1f71498056f150bf
Reviewed-on: https://dart-review.googlesource.com/c/92521
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-02-09 19:01:14 +00:00
pq 18b5d66966 pass analysis options to linter contexts
Adds an analysis options backpointer to linter contexts.  With this, lint rules can
query options and conditionally support enabled language experiments.



Change-Id: I35dbfd112ed5f149dcc17b17b2edaf7420b38090
Reviewed-on: https://dart-review.googlesource.com/c/92460
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2019-02-08 23:38:58 +00:00
Konstantin Shcheglov 2bab9eab49 Guard against empty URIs.
Particularly, against empty `part` URIs, because this would cause us
to think that the library includes a part, which URI is... the library
itself, because `resolveUri(uri, '') === uri`.

R=brianwilkerson@google.com

Change-Id: Ie6bf0279c467b00d9b5540697e866d0e619d49b0
Reviewed-on: https://dart-review.googlesource.com/c/92443
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-02-08 23:07:50 +00:00
Konstantin Shcheglov 61ae86bce2 Add relevance tags to available declarations.
R=brianwilkerson@google.com

Change-Id: Ifa0fef7f9e572368c857fe972e007483782f119e
Reviewed-on: https://dart-review.googlesource.com/c/92405
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-02-08 19:56:36 +00:00
Konstantin Shcheglov 6b0baad623 Track definitely nullable and non-nullable variables.
This CL also contains changes from another CL.
Add missing generics in FlowAnalysis.
I can wait until that CL lands, and rebase, if it helps.

This CL also switches to a different approach to handle try / finally,
using two parallel states instead of 'restrict'.

R=paulberry@google.com

Change-Id: I1ca5bed3b4362cb3bdca5abf36c849c59538e57e
Reviewed-on: https://dart-review.googlesource.com/c/92246
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-02-08 19:54:16 +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
Kevin Millikin be79eb4517 Ship experiment 'set-literals'
Change-Id: Ief182017752b87ef099ac5140ff781cbb14d76a9
Reviewed-on: https://dart-review.googlesource.com/c/92125
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Kevin Millikin <kmillikin@google.com>
2019-02-08 16:17:55 +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 26379d088d Update dartfix to report path of resource if resource changes during analysis
Change-Id: Ia537083013173f9a0dafd174f55bed11ec09d95c
Reviewed-on: https://dart-review.googlesource.com/c/92360
Commit-Queue: Dan Rubel <danrubel@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-02-07 22:05:49 +00:00
Konstantin Shcheglov da7ed9b05a Add missing generics in FlowAnalysis.
R=paulberry@google.com

Change-Id: I8e7334ad68bdb8080b8dce90a726284b6bd88b64
Reviewed-on: https://dart-review.googlesource.com/c/92244
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2019-02-07 21:17:07 +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 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
Konstantin Shcheglov 33337cf8d0 Fix API breakage, reexport ConstantEvaluator.
Fixes non-API breakage done in https://dart-review.googlesource.com/c/sdk/+/92080

R=brianwilkerson@google.com

Change-Id: Iaec482c341b11e260594d56e42bb6904d376e24d
Reviewed-on: https://dart-review.googlesource.com/c/92169
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-02-07 00:27:23 +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
Konstantin Shcheglov fd2225ab6c Adapt to the flow analysis spec v2.
R=paulberry@google.com

Change-Id: I42ad94079233516007bec6285088d3d8245a4edd
Reviewed-on: https://dart-review.googlesource.com/c/92160
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2019-02-06 20:11:12 +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 adfa4791fc Improve storage for available declarations.
1. Getters and setters.

2. Parameters.

3. Restore null where should when reading from flatbuffers.

R=brianwilkerson@google.com

Change-Id: I934e828ced6ae21c1c633c2a94e3336078eb2747
Reviewed-on: https://dart-review.googlesource.com/c/92084
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-02-06 17:35:45 +00:00
Konstantin Shcheglov 661e91e30e Extract and migrate tests for ConstantEvaluator.
R=brianwilkerson@google.com

Change-Id: Ia637dbe78a710678153cfc74726bf4825e36f755
Reviewed-on: https://dart-review.googlesource.com/c/92080
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-02-06 16:54:35 +00:00
Konstantin Shcheglov cc74e20eee Make some fields on Interface private, and change the way InheritanceManager2 is tested.
R=brianwilkerson@google.com

Change-Id: I960e512fa7d91fc64e66595419a1fbd358d68e2f
Reviewed-on: https://dart-review.googlesource.com/c/92065
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-02-06 16:52:50 +00:00
Konstantin Shcheglov 1c0422735e Abstract type operations in flow analysis.
R=paulberry@google.com

Change-Id: I2dad238e7a49317951bd011095645341cf3b2bb4
Reviewed-on: https://dart-review.googlesource.com/c/92026
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-02-06 15:37:48 +00:00
Konstantin Shcheglov 631c550ff9 Extract and migrate ExitDetector and its tests.
R=brianwilkerson@google.com

Change-Id: I4d3699ffab56d85240809fe50b36c1593e4e19d2
Reviewed-on: https://dart-review.googlesource.com/c/92027
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-02-06 01:54:55 +00:00
Konstantin Shcheglov c26bf54391 Add InheritanceManager2 APIs to access inherited interface/class maps.
I'm not particularly attached to the names of new methods.
So, if you have better ideas, please tell me.

R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/35833
Change-Id: Ibe906c7f779c7606ca3093fd27203fc7c77392b0
Reviewed-on: https://dart-review.googlesource.com/c/91847
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-02-05 22:15:05 +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
Paul Berry 1f638607c2 Rework the ConstraintVariable.or constructor.
The constructor now records constraints to make sure that the newly
created constraint variable is consistent with the variables that it
is formed from.

Change-Id: I928ff41aaab1b849905b7c8d622049fdd73cdd3e
Reviewed-on: https://dart-review.googlesource.com/c/91948
Auto-Submit: Paul Berry <paulberry@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
2019-02-05 00:24:32 +00:00
Brian Wilkerson 35ab1755f4 Support more type propagation for code-as-ui features
Change-Id: I9f7d93387653cc279dc657e689764d19a6d31858
Reviewed-on: https://dart-review.googlesource.com/c/91766
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-02-04 21:55:21 +00:00
Konstantin Shcheglov eefc18dc82 Add a hook to AnalysisDriver on the current session to be discarded.
R=brianwilkerson@google.com, danrubel@google.com

Change-Id: Ie2a84c22d74fd1ba51f5add15fb881fb8b7e6c96
Reviewed-on: https://dart-review.googlesource.com/c/91947
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-02-04 20:21:19 +00:00
Paul Berry 38aadd71df Rework DecoratedType substitution.
Rather than have a special class for substitutions, we simply use a
map from TypeParameterElement to substituted DecoratedType, and we
move the substitution logic into DecoratedType.

This paves the way for a future rework of DecoratedType.

Change-Id: I21145777e5e04a7e24c0c3ff34fdc20fbe8b8feb
Reviewed-on: https://dart-review.googlesource.com/c/91940
Auto-Submit: Paul Berry <paulberry@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
2019-02-04 14:59:55 +00:00
pq 0d075031fa allow custom analysis options in lint driving
Support for enabling experiments in linter tests.

See: https://github.com/dart-lang/linter/issues/1412


Change-Id: I1f33d8089f1f628a05fef402dc441c73d9309ba2
Reviewed-on: https://dart-review.googlesource.com/c/91854
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2019-02-03 19:59:07 +00:00
Konstantin Shcheglov f89acfa374 Issue 35621. Part files should use their own transitive signatures.
Previously we had a bug, when a library linked summary was computed,
and then a part of this library is incorrectly imported as a library,
the implementation of `transitiveSignature` was returning the
signature of the containing library, so we would use the linked library
of the actual library, but the unlinked summary of the part file.

R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/35621
Change-Id: If225136de4e6576f0499d2318a67c721d80d17ae
Reviewed-on: https://dart-review.googlesource.com/c/91855
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-02-03 19:05:26 +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