Commit Graph

26856 Commits

Author SHA1 Message Date
Robert Nystrom 7516af7237 Add support for test requirements.
This gives us a way to specify that a test is only meaningful for
certain NNBD modes and should be skipped on other configurations. My
hope is we can extend this for other platform capabilities and then
eventually use this to express "skips" instead of relying on status
files for them.

Change-Id: I99548c326ee6fbe6db64e28e7f7f07d2fc1fd23c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117080
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2019-09-13 00:27:30 +00:00
Alexander Markov 1cd6518897 Revert "[vm/bytecode] Workaround for incorrect type parameters in function types"
This reverts commit 98837e6e43.

Reason for revert: proper fix landed in CFE (https://dart-review.googlesource.com/c/sdk/+/115368),
so reverting this workaround in bytecode generator.


Original change's description:
> [vm/bytecode] Workaround for incorrect type parameters in function types
>
> Fixes crashes on the following tests in bytecode mode:
> co19_2/LanguageFeatures/Extension-methods/generic_parameter_inference_A01_t02
> co19_2/LanguageFeatures/Extension-methods/generic_parameter_inference_A01_t05/01
> co19_2/LanguageFeatures/Extension-methods/generic_parameter_inference_A01_t05/02
> co19_2/LanguageFeatures/Extension-methods/generic_parameter_inference_A01_t05/none
> co19_2/LanguageFeatures/Extension-methods/generic_parameter_inference_A01_t06
>
> Issue: https://github.com/dart-lang/sdk/issues/37536
> Change-Id: Ief39058056fa2b1ad351dd99f630d11d17f8ce59
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116090
> Reviewed-by: Régis Crelier <regis@google.com>
> Commit-Queue: Alexander Markov <alexmarkov@google.com>

TBR=rmacnak@google.com,alexmarkov@google.com,dmitryas@google.com,regis@google.com

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

Issue: https://github.com/dart-lang/sdk/issues/37536
Change-Id: Id4886c398a7e97d6f183dbca61d7a287439074a6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117100
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2019-09-13 00:08:00 +00:00
Konstantin Shcheglov c138b505be Update TypeSystem tests to reuse AbstractTypeSystemTest.
R=brianwilkerson@google.com

Change-Id: Ic6e446cf124a52c8663140a995d4a58c3e4c92a1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117015
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-12 23:18:07 +00:00
Mike Fairhurst 5beca80bc7 [analyzer] add isNullAware to IndexExpression
Change-Id: I3c3b1b0a38ea81fd573ec005e810eb2b000b3430
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116740
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2019-09-12 21:31:57 +00:00
Mike Fairhurst 2bc48ad1b6 [analyzer] add isNullAware to propertyAccess
Change-Id: Ia785a308e7281d6d17d05b38d52337f611708206
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116685
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-09-12 21:29:27 +00:00
Mike Fairhurst 68bcc00d10 [analyzer] implement isNullAware for method invocations
Change-Id: I630f94311a55b7a7fce5e47143e333abffe19c9b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116681
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-09-12 21:21:22 +00:00
Brian Wilkerson 7badd807b1 Add a fix to replace an override with the extension name if accessing a static member
Change-Id: I5c7557aaff6af4eeaad196513c3315679fab26f9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117011
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-09-12 19:54:52 +00:00
Konstantin Shcheglov c72a8589d9 Don't use DartType.instantiate() in TypeProviderImpl.
R=brianwilkerson@google.com

Change-Id: I4f5b0edb618d49fa20c5102d896d09b94aeb0653
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117003
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-12 19:43:02 +00:00
Brian Wilkerson 49de78b708 Convert tests so that they will continue to pass when extension methods are enabled by default
Change-Id: I58722f78c19d00842d98ebb238622e88c06468e2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117009
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-09-12 19:12:12 +00:00
pq 9d3de982c6 fix for REMOVE_UNUSED_LABEL
see:  https://github.com/dart-lang/sdk/issues/38361

Change-Id: I45fdba9f12d9fdfd7d431149da97632df97a4653
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117008
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2019-09-12 18:59:18 +00:00
Nate Bosch 97925ece63 Delete test_runner/tool/co19.dart
Towards #37318

Removes a script using the deprecated `--checked` flag. No one appears to be
using this tool.

Change-Id: Ib9d30790943845ece2cb5e4af1e4f45da5a28f79
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115769
Auto-Submit: Nate Bosch <nbosch@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2019-09-12 18:43:09 +00:00
Paul Berry 29ce9350d3 Migration: add a test case documenting a problem with "is" checks.
See #38340.

Change-Id: If6517cecb9c97796e0ff93ddebfa4afe51b96c0f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116860
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-09-12 17:53:26 +00:00
Paul Berry 152fbbb1d9 Migration: add a test case documenting an operator== corner case.
See #38339.

Change-Id: I98bf1f2931d57f5973326abef22f0f3bd3e9f911
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116827
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-09-12 17:53:26 +00:00
Konstantin Shcheglov fc2f744d9e Deprecate 'Source.encoding'.
R=brianwilkerson@google.com

Change-Id: I1a97c9b5a1401a16044df4e37117b2ec7e4e5db2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117002
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-12 16:48:16 +00:00
Brian Wilkerson c74e68e501 Add documentation for more diagnostics
Change-Id: Id2aeb13db0ceb81fc18d67e6ef2778304b36d02b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117000
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-09-12 16:35:46 +00:00
Konstantin Shcheglov 59008b8692 Skip parts with invalid URIs.
R=brianwilkerson@google.com

Bug: https://buganizer.corp.google.com/issues/140849287
Change-Id: I97da019f5aa6ec4db3b796842aaaa91834fc00b3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116894
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-12 15:51:20 +00:00
danrubel 3b1d3de988 update parser to report out of order "?.." operator
Change-Id: I2d90e458d5721d16142752e8ac6a522cc41c2051
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116920
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-09-12 14:38:31 +00:00
Dmitry Stefantsov bdf237fa77 [cfe] Add a bit to Library to inticate if it's opted in for NNBD
Closes #37682.

Bug: http://dartbug.com/37682.
Change-Id: Ibe21cd0a1eac25a2883d2e2241d7476ca627edba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114857
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2019-09-12 12:15:56 +00:00
Dmitry Stefantsov 94b3a3f2ac [cfe] Don't reuse type parameters of FunctionNode in its functionType
Closes #37536.

Bug: http://dartbug.com/37536.
Change-Id: I7e5d2fc59a0cf53e67c43989cf806ca7dbcc307e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115368
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-09-12 11:12:52 +00:00
Jens Johansen ce5556ab36 [kernel] Load classes lazily
This CL gives the option to load classes lazily (on by default),
meaning that fields, procedures, constructors and redirecting
factory constructors of classes are not initially read,
but instead read when (or if) needed.

The idea being that many classes aren’t needed, and that
spending time on reading them is thus just a waste of time.

This is especially true in modular compilation where a lot
of modules needs to be given as input as the compilation at
hand might technically rely on it, but in practice only very
few of the classes are actually needed (or very few classes
actually need their members).

The below numbers are comparing a VM without this change and without
the lazy class hierarchy member lists change with
b31566b297 (the base change for those
two changes).

For running a simple hello-world script, on my machine 500 times
and doing statistics on it I can measure the following differences:

With verbose, from kernel_service startup to compile complete:
Difference at 95.0% confidence
        -17.8 +/- 0.555817
        -24.3455% +/- 0.760206%
        (Student's t, pooled s = 4.48379)

With verbose, total runtime measure by `time`
Difference at 95.0% confidence
        -19.346 +/- 0.905217
        -12.0333% +/- 0.563051%
        (Student's t, pooled s = 7.30242)

Without verbose, total runtime measure by `time`
Difference at 95.0% confidence
        -17.862 +/- 0.842905
        -12.0635% +/- 0.569276%
        (Student's t, pooled s = 6.79974)

For running a number of modular compilations I’ve recorded an
improvement in actual runtime in the order of 20-37% depending
on the circumstance. In a real build system, though, the
difference seems to be more in the order of around 5%.

Change-Id: Id329bcf2b01d12c12d7a49f2b8abacd9c2447f05
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115703
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-09-12 08:08:33 +00:00
Jens Johansen 2bfe714d42 [kernel] Make class hierarchy member lists lazy
This should
a) Make it faster in situations where we don't need the member lists
b) Pave (some of) the way for loading dill files more lazy

Change-Id: I877026d5e503aec6b398ba93f5816a187aa11c6e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115217
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-09-12 08:01:52 +00:00
Dmitry Stefantsov a62289451d Update changelog to include the recent breaking change
Link to the breaking change request:
https://github.com/dart-lang/sdk/issues/37985

Change-Id: I0fcb058e953a43a20e7b663f63bb88100f376a6b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116762
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2019-09-12 07:37:17 +00:00
David Morgan 60ca2b840d Revert "Enable visibleForTesting on unnamed constructors"
This reverts commit de7ad46797.

Reason for revert: breaking for google3; need to discuss how to land this kind of change.

Original change's description:
> Enable visibleForTesting on unnamed constructors
> 
> Fixes #37936
> 
> Change-Id: I99023b66d7d53922edecfbab7be41d4c4145ec15
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114591
> Commit-Queue: Samuel Rawlins <srawlins@google.com>
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>

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

Change-Id: I9d3688b4dcdff92f94b83e1e557a488abfd963cb
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116782
Reviewed-by: David Morgan <davidmorgan@google.com>
Commit-Queue: David Morgan <davidmorgan@google.com>
2019-09-12 07:34:49 +00:00
Alexander Aprelev 0c481a196c Revert Reland '[vm/ffi] Implement FFI callbacks on AOT for ELF and Asm snapshots (excl. blobs).' as it breaks flutter profile execution on ios 32-bit platform.
Fixes https://github.com/flutter/flutter/issues/40114

Change-Id: If8d71e9c19c2e794d29f7ecbacb87457890a2fd5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116883
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2019-09-12 00:10:09 +00:00
pq 1d01d91c33 fix for sort_child_properties_last
Change-Id: Ife3f05077fcd48e8f821314b55ba481918ba05c6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116822
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2019-09-12 00:07:40 +00:00
Konstantin Shcheglov eac977bef0 Issue 38273. Fix for inlining methods ending with a return statement without an expression.
R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/38273
Change-Id: Ib399379f8aecb1e7737f2efdeb9dbf53f27d4abb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116881
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-11 23:27:40 +00:00
Robert Nystrom 0d1636e0b2 Simplify how the list of TestCases for each TestConfiguration is made.
- Make it synchronous. I did some benchmarking and the async didn't seem
  to make a measurable difference and made the code harder to follow.
- Fix a bunch of small-scale idiom things: "var", names, etc.
- Move TestCase.hash into TestFile since that lets us access it before
  we've created a TestCase.
- Remove dead code.
- Make it clearer which functions work with TestFiles and which with
  TestCases.
- Clarify the code that determines whether or not to enqueue a test.

The last point is the motivating one. Soon, I'll be extending this code
to take NNBD into account when determining which tests to skip, so I
wanted to clean it up some first.

Change-Id: I488ed6c7d2453535968ac43389a2fd8370ead57d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116662
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2019-09-11 23:05:59 +00:00
Konstantin Shcheglov c6b0ae1fda Fix for indexing FieldFormalParameterMember with unresolved field.
R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/38071
Change-Id: Ifa2f9218357f0f7bb3236f66aee34c8940c8b206
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116865
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-11 22:45:59 +00:00
Konstantin Shcheglov c99cd5b82e Add more dart:html, enough for angular_analyzer_plugin.
R=brianwilkerson@google.com

Change-Id: Ib45e5464e18839c65878e52f6a3c281416a9c952
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116861
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-11 22:04:09 +00:00
Konstantin Shcheglov 3e63f06afd Remove CancelableFuture.
We don't use it anymore, and none of our clients does.

R=brianwilkerson@google.com

Change-Id: Iac840c182b47d85595ca80762fa8a207d8545585
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116752
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-11 22:03:19 +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 e8836f5086 Fix sample for UNDEFINED_SETTER.
R=brianwilkerson@google.com

Change-Id: I9c897ee5890d4b951cf157a5da6c21a5505248d3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116823
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-11 21:20:57 +00:00
Konstantin Shcheglov d39b67dbfe Remove more unused classes from engine.dart
R=brianwilkerson@google.com

Change-Id: I8d660025e201ef8a79d377c1923fe9a87bbc80ae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116750
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-11 20:12:49 +00:00
pq e35408df41 update REMOVE_TYPE_ANNOTATION assist error associations
(mainly book-keeping and TODOs)

Change-Id: Ic99828b469e7e78c1ae100fa0a0b15d14c5ecfcf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116801
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2019-09-11 20:10:39 +00:00
Brian Wilkerson d36f5ed181 Fix diagnostic documentation tests and add support for documenting parser codes
Change-Id: Ie2e360e6e4a344888bb409d20f21c969280bbdf9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116742
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-09-11 19:45:47 +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 be93b04a7c Introduce a better diagnostic message for unqualified references to static members within extensions
Change-Id: Ie505bf86e510161bf5dece489292388039902f83
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116748
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-09-11 19:02:56 +00:00
Sam Rawlins de7ad46797 Enable visibleForTesting on unnamed constructors
Fixes #37936

Change-Id: I99023b66d7d53922edecfbab7be41d4c4145ec15
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114591
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-09-11 18:20:46 +00:00
Sam Rawlins 80040e5cfe Remove errors for raw types in is or as expressions.
This brings the errors in line with the exceptions described in the spec:

https://github.com/dart-lang/language/blob/master/resources/type-system/strict-raw-types.md#conditions-for-a-raw-type-hint

Change-Id: I045237d937579d4390d3e676dc5e12346b90b480
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116381
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2019-09-11 18:13:46 +00:00
Konstantin Shcheglov dd3d6547de Rewrite property resolution, fix reporting errors when compound assignment without a getter.
Change-Id: Id737ea776866c3d9a52033181759f27e26dc34b0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116559
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-09-11 17:28:53 +00:00
Konstantin Shcheglov 76e6325ae0 Remove unused methods of AnalysisContext.
Change-Id: Ie7f81ac09b51f7a4e70a32f962e6e15c81245820
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116724
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-11 17:09:47 +00:00
pq 27918cdb29 fix for prefer_inlined_adds
Change-Id: Icd307a2bc7fdb1d3e63fd5144af79dcc430b5ba8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116741
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2019-09-11 16:54:07 +00:00
danrubel 16c7ac92bf move const method error reporting into parser
Change-Id: Ibae4aeb0362138e742f80186ed98a20eb3469ba1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116661
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-09-11 14:48:47 +00:00
Brian Wilkerson 9113fb3ce0 Move the remaining StaticWarningCode tests to their own files
Change-Id: I764c9cbd961bc377d1b158aa0e16b2fb0e77b8cf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116722
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-09-11 13:34:57 +00:00
Brian Wilkerson 1b67cc79da Suggest completions for extensions in parts
Change-Id: I3aceaf24680ee7599a0beccd79dde1f790ec5ad1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116686
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-09-11 13:34:07 +00:00
Paul Berry f3b2d770ad Migration: rework assignment handling.
This change separates the handling of upcast assignments (which we
handle precisely) from downcast assignments (which we handle on a
"best effort" basis).

Should address ~2 exceptions whose stack trace includes the line

_AssignmentChecker._checkAssignment_recursion (package:nnbd_migration/src/edge_builder.dart:2087:9)

Change-Id: I0026f470a02c266c43d94ad2f08b84b8b3d7d228
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116687
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-09-11 00:25:14 +00:00
Paul Berry 1bbee6119d Migration: handle binary expressions whose LHS has type dynamic.
Should address ~21 exceptions whose stack trace includes the line

EdgeBuilder.visitBinaryExpression (package:nnbd_migration/src/edge_builder.dart:374:14)

Change-Id: I884ac0884e4249028219ca7ba374ec95a0849d7a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116683
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-09-11 00:25:14 +00:00
Paul Berry 75fd88cf8c Migration: handle dynamic function expression invocations.
Should address ~17 exceptions whose stack trace contains the line:

EdgeBuilder._handleInvocationArguments (package:nnbd_migration/src/edge_builder.dart:1783:21)

Change-Id: I05eb69ac5a1bbda67bd080f5c9db4fd66ee1f8bd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116680
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
2019-09-11 00:25:14 +00:00
Paul Berry eeb1716660 Migration: don't forget to visit arguments to dynamic invocations.
Change-Id: Id2a6e09d7d7b5ac68e4a2f15612243c729fa4392
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116557
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
2019-09-11 00:25:14 +00:00
Paul Berry 3cccd7f117 Migration: handle ??= assignments.
This should address ~24 exceptions whose stack trace contains the line:

EdgeBuilder.visitAssignmentExpression (package:nnbd_migration/src/edge_builder.dart:278:7)

Change-Id: I63cbc48422aeb85f49731dc479c8203a9fd6fecf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116554
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-09-11 00:25:14 +00:00