Commit graph

5451 commits

Author SHA1 Message Date
Sam Rawlins 372537f1e4 Add first support for strict-inference as an analysis option.
The first code is HintCode.INFERENCE_FAILURE_ON_UNINITIALIZED_VARIABLE:

```dart
var a;  // Hint: The type of v1 cannot be inferred without a type or initializer
dynamic b;  // OK
var c = 7;  // OK
```

This is currently only enabled via an analysis options file:

```yaml
analyzer:
  language:
    strict-inference: true
```

I could add it as a flag as well, but to start using this internally at Google,
we only need support in the analysis options file.

Bug: https://github.com/dart-lang/sdk/issues/33749
Change-Id: Id2a6afa7c3d724b44c20576c7f48869abcf4255c
Reviewed-on: https://dart-review.googlesource.com/c/93700
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-02-21 17:28:19 +00:00
Konstantin Shcheglov c49537e743 Support for 'double' fields in summaries.
We already can store List<double>, but not `double` itself.

The LinkedConstantValue data structure I'm working on will have a
field of type `double`, so I need to support in in the generator.

R=paulberry@google.com

Change-Id: Ic5aa3a9a7266afabe6c64214fd68097fbebda4e8
Reviewed-on: https://dart-review.googlesource.com/c/93820
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-02-21 17:06:49 +00:00
Brian Wilkerson 9cdc189280 Fix bugs in list literals and add some inference tests
Change-Id: Ia0921b6a7e4ae944587b85b4601cbe88c654c3b3
Reviewed-on: https://dart-review.googlesource.com/c/93821
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-02-21 13:44:29 +00:00
Konstantin Shcheglov f5d43c45ea Include 'linterVersion' into AnalysisOption signature.
BTW, I'm in doubt about using global variable in AnalysisOption directly.

Maybe make it a writable option, like `lintRules`, so that we don't use
static data? I realize that most probably we set `lintRules` into
AnalysisOptions just because it is just convenient to separate registry
and enable rules, not because we want separation from static data.


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

Bug: https://github.com/dart-lang/linter/issues/1440
Change-Id: I44f5c8cdc41eaead926fbbe250063c41bd888a78
Reviewed-on: https://dart-review.googlesource.com/c/93844
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-02-21 04:17:19 +00:00
pq 371d244273 linter version support
See: https://github.com/dart-lang/linter/issues/1440

Change-Id: I0198ea52fb9d5680e76a462d25d7302cd4aa6be8
Reviewed-on: https://dart-review.googlesource.com/c/93882
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2019-02-21 00:58:08 +00:00
Konstantin Shcheglov 8ac6114028 Sort AvailableDeclaration fields.
IntelliJ had a regression for a short time, so sorting did not work.

R=brianwilkerson@google.com

Change-Id: I0b631e8061bc3139f0848492e35c583b6bfb4ec4
Reviewed-on: https://dart-review.googlesource.com/c/93747
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-02-20 22:51:58 +00:00
Mike Fairhurst 48a9eb87ba [analyzer] Add hint for unnecessary ?.
Change-Id: I7a8532d353b1840332b7583a1884e6487a7656bf
Reviewed-on: https://dart-review.googlesource.com/c/92381
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-02-20 22:35:49 +00:00
Mike Fairhurst ccb2e2d293 [analyzer] Report dead code for x ?? y where x is non-null
Change-Id: I2946c5c9b8136151895a458b8ff44da66c96671a
Reviewed-on: https://dart-review.googlesource.com/c/92384
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-02-20 22:33:09 +00:00
Konstantin Shcheglov 004dd969b0 Remove mock_type.dart, it looks that it is not used.
R=brianwilkerson@google.com

Change-Id: Ic3e44afbc7be19536341781eb41bf725934d1aa3
Reviewed-on: https://dart-review.googlesource.com/c/93802
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-02-20 22:03:42 +00:00
Paul Berry 7ebd02cdaa Work around for #35908.
As a temporary workaround, we ignore types when comparing default values for overrides.

See https://github.com/dart-lang/sdk/issues/35908 for a more detailed
explanation for why this is necessary.  Once summaries properly record
types of constant values, we will be able to revert this hack.

Change-Id: I04728231338274a088656a629e303c0f1745466d
Reviewed-on: https://dart-review.googlesource.com/c/93642
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-02-20 20:20:05 +00:00
danrubel 8b0dd94e11 Revise AstBuilder to generate the new set-or-map AST structure
This is the first of several CLs updating the parser and its listeners
to conform to the unified collection spec:
https://github.com/dart-lang/language/pull/200

Change-Id: I7750bc4b029f3963b2df77dab3630775ce921bba
Reviewed-on: https://dart-review.googlesource.com/c/93740
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-02-20 19:49:45 +00:00
Konstantin Shcheglov 45cb49108f Issue 3204. Include mixin(s) into top-level declaration for import Quick Fix.
R=brianwilkerson@google.com

Bug: https://github.com/flutter/flutter-intellij/issues/3204
Change-Id: Ia80fca430c9cbe710ccaf74b97a1b025634b85b1
Reviewed-on: https://dart-review.googlesource.com/c/93641
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-02-20 03:05:21 +00:00
Konstantin Shcheglov 5722ca3126 Include defaultArgumentListString / defaultArgumentListTextRanges into AvailableSuggestion(s).
R=brianwilkerson@google.com

Change-Id: I114c3c53de5782fa72d033a39e0d96fa5134ea1c
Reviewed-on: https://dart-review.googlesource.com/c/93600
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-02-20 00:15:21 +00:00
Konstantin Shcheglov 1ed9a34513 Add defaultArgumentListString / defaultArgumentListTextRanges to Declaration.
R=brianwilkerson@google.com

Change-Id: I1ce920bf3373634674f12b6e710f702214335e83
Reviewed-on: https://dart-review.googlesource.com/c/93371
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-02-19 21:17:31 +00:00
Brian Wilkerson bcd2c7fb96 Fix ListLiteral construction and add comments
Change-Id: I52c925f3457ea039e08b59689f850cb1d1b8ab4a
Reviewed-on: https://dart-review.googlesource.com/c/93461
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-02-19 16:37:30 +00:00
Konstantin Shcheglov c9ef5be8d7 Issue 124524319. Improve getElementDeclaration to support invalid code with synthetic names.
R=brianwilkerson@google.com

Bug: https://buganizer.corp.google.com/issues/124524319
Change-Id: Ie80cc66d580aa1c84892df6f839480d6d0501210
Reviewed-on: https://dart-review.googlesource.com/c/93484
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-02-19 03:36:54 +00:00
Brian Wilkerson 03932bb852 Convert more diagnostic tests to DriverResolutionTest
Change-Id: Ia3aaf54d2142300180b66c7fd18245fb492f8176
Reviewed-on: https://dart-review.googlesource.com/c/93480
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-02-18 19:53:33 +00:00
Paul Berry ab38cf7897 Allow non-nullable usage to imply non-null intent.
If a method parameter is used in unconditional control flow in a way
that a `null` value would directly lead to an exception (i.e. by
dereferencing it, or by passing it to a method that requires a
non-nullable value), this is treated as implying that the method
parameter is intended to be non-nullable.

Change-Id: I4f55e4c95b3cfaee0a2ba9367b47d51083e0b7b1
Reviewed-on: https://dart-review.googlesource.com/c/93363
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-02-16 13:35:48 +00:00
Konstantin Shcheglov fd8b546800 Issue 35940. Clear evaluation results for constants in the library being analyzed.
R=brianwilkerson@google.com, paulberry@google.com

Bug: https://github.com/dart-lang/sdk/issues/35940
Change-Id: Ife6199d344a197242c50020337d0e2854a72eef9
Reviewed-on: https://dart-review.googlesource.com/c/93340
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-02-15 16:46:46 +00:00
Konstantin Shcheglov 39afa4e555 Revert "Add ExecutableElement(s) based InheritanceManager3, and switch analyzer to it."
This reverts commit 5d6bab4ed2.

Reason for revert: this change is API incompatible when rolling into mono-repo.

Original change's description:
> Add ExecutableElement(s) based InheritanceManager3, and switch analyzer to it.
> 
> Change-Id: I9d87619e05ae769f4df6a6ba26cd7901c7c98510
> Reviewed-on: https://dart-review.googlesource.com/c/93141
> Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>

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

Change-Id: I98d478f56e8aea037cbcc8b6cb940c36edb732fd
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/93440
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-02-15 16:38:08 +00:00
Brian Wilkerson 122aa43ef6 Convert ListLiteral and remove uses of ListLiteral2
Change-Id: I6c6f60ae969deb798cdbc8572341f2a51256b194
Reviewed-on: https://dart-review.googlesource.com/c/93341
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-02-15 16:17:28 +00:00
Konstantin Shcheglov 5d6bab4ed2 Add ExecutableElement(s) based InheritanceManager3, and switch analyzer to it.
Change-Id: I9d87619e05ae769f4df6a6ba26cd7901c7c98510
Reviewed-on: https://dart-review.googlesource.com/c/93141
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-02-14 18:11:18 +00:00
Brian Wilkerson 46aa511b49 Improve the message when using a prefix to reference an undefined name (issue 35936)
Change-Id: Iae25bdffc992e0a50687ab54c56118cd13dfa26f
Reviewed-on: https://dart-review.googlesource.com/c/93121
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-02-13 23:37:37 +00:00
Konstantin Shcheglov f4ec983fec Migrate the rest of element_test from task model.
R=brianwilkerson@google.com

Change-Id: Iebc0b21b96ebef17503bf3ef672fbaf702144368
Reviewed-on: https://dart-review.googlesource.com/c/93142
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-02-13 23:00:02 +00:00
Dan Rubel 94d8e730fb Remove parser enableSetLiterals flag
Change-Id: I5e806f2e4a1dd368417802f7b4ff18bc1b4d0250
Reviewed-on: https://dart-review.googlesource.com/c/92843
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-02-13 22:57:12 +00:00
Brian Wilkerson 9b45c14c65 First stage cleanup of MapLiteral2 and SetLiteral2
Change-Id: I73ec2e6fa4509539f86dd906bcb411e6267c77aa
Reviewed-on: https://dart-review.googlesource.com/c/93143
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-02-13 22:51:57 +00:00
Brian Wilkerson 7a63d31151 Improve the message when importing a deprecated library (issue 35922)
Change-Id: Id37c87c0dc007a55c01dfabb2d3b4639f82ea9cc
Reviewed-on: https://dart-review.googlesource.com/c/93066
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2019-02-13 20:18:56 +00:00
Brian Wilkerson 30f9f5b1c7 Add SetOrMapLiteral to support the code-as-ui features
Change-Id: I6d3023855fea6da859af0815bfae6857f1546cb9
Reviewed-on: https://dart-review.googlesource.com/c/93062
Reviewed-by: Dan Rubel <danrubel@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2019-02-13 20:14:24 +00:00
Konstantin Shcheglov 7f2f840a91 Don't include constants of private enums.
R=brianwilkerson@google.com

Change-Id: I477db71282da118a74844c7c3d8d7c5b992d61b1
Reviewed-on: https://dart-review.googlesource.com/c/93067
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-02-13 19:41:06 +00:00
Konstantin Shcheglov def7e2dac7 Migrate ConstantVisitorTest from task model.
R=brianwilkerson@google.com

Change-Id: I7822f13a4438e7460e136d56ad3b5abf6fd1b11d
Reviewed-on: https://dart-review.googlesource.com/c/92925
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-02-13 16:43:41 +00:00
Konstantin Shcheglov a31a72521b Don't include declarations of the library itself.
These declarations are already available through the library element
model.

R=brianwilkerson@google.com

Change-Id: I9d3d274a8bf4ad28c10f04afc30fa11436cd0f6a
Reviewed-on: https://dart-review.googlesource.com/c/92848
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-02-13 05:43:23 +00:00
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