Commit Graph

34658 Commits

Author SHA1 Message Date
Danny Tuppeny 387e9d9ab2 [analyzer] Include ConditionalExpressions in Flutter Outlines
Fixes https://github.com/Dart-Code/Dart-Code/issues/3196.

Change-Id: I369e48285329c808a092ff677440e159aa7a103b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192688
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-03-24 15:01:21 +00:00
Jens Johansen 8270944c5d [CFE] Extend weekly test - fuzz tests and advanced invalidation leak test
We currently run our leak tests weekly.
This extends it so we also run leak tests with advanced invalidation,
as well as our strong and weak tests with fuzzing enabled.

Change-Id: I2c941f58594791d1981c6b6612db2205b68f5e19
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192682
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2021-03-24 14:44:51 +00:00
Paul Berry 58dc586929 Remove redundant line number from referencedBeforeDeclaration.
Context messages are already displayed in a way that makes it easy for
the user to locate the line of code in question; it's unnecessary to
include the line number in the context message itself.

See discussion at
https://buganizer.corp.google.com/issues/179782591#comment9.

Change-Id: I2d1383c4cee0ece0d302449302d1f1902fbf136c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192480
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2021-03-24 14:07:51 +00:00
Jens Johansen 9d5f3187ad [CFE] Crash reproductions
Change-Id: Iddf58c3af16fd56aa7cc9bd1a988ec45a4a042a0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175243
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2021-03-24 13:45:31 +00:00
Sam Rawlins 97cd131c9a analyzer: Introduce cannot-ignore analysis option.
Fixes https://github.com/dart-lang/sdk/issues/45404, which describes the option
in detail.

This removes all unfortunate exceptions for dart2js test code and for flutter
code. This removes the lateness of one final field.

Fixes https://github.com/dart-lang/sdk/issues/44237

Fixes https://github.com/dart-lang/sdk/issues/42977

Fixes https://github.com/dart-lang/sdk/issues/45230

Related to https://github.com/flutter/flutter/issues/52899

Change-Id: I054f487fafe2742ae57da1d2ccd2d52dce4188bf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192560
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-03-24 13:32:49 +00:00
Sam Rawlins 3efcdb3ff0 front_end: Remove unnecessary import
Bug: https://github.com/dart-lang/sdk/issues/44569
Change-Id: I631483a90d89268c0ffd75ee2e1c27ba19f084cb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192609
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-03-24 13:30:49 +00:00
Paul Berry da29d5af66 Share checkForFieldInitializerNotAssignable betwen resolver and ErrorVerifier.
In order to implement "why not promoted" functionality for constructor
field initializers, we will need to call
checkForFieldInitializerNotAssignable from the resolver, so that we can pass it
failed promotion information.  So move it into the
ErrorDetectionHelpers mixin.

Bug: https://github.com/dart-lang/sdk/issues/44898
Change-Id: I95094e198a97608bf27f84cfb3cac40824a30ba4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192723
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2021-03-24 12:10:09 +00:00
Paul Berry ca8663492d Share checkForInvalidAssignment betwen resolver and ErrorVerifier.
In order to implement "why not promoted" functionality for variable
declaration initializers, we will need to call
checkForInvalidAssignment from the resolver, so that we can pass it
failed promotion information.  So move it into the
ErrorDetectionHelpers mixin, along with _checkForAssignableExpression
(which it calls).

_checkForAssignableExpressionAtType can now be private, since all of
its callers are now in ErrorDetectionHelpers.

Bug: https://github.com/dart-lang/sdk/issues/44898
Change-Id: I6655e3a655d330d61459692804854c89c0dcff70
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192612
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-03-24 12:10:09 +00:00
Paul Berry 20d9c6eb3a Flow analysis: implement "why not promoted" logic for boolean conditions
Bug: https://github.com/dart-lang/sdk/issues/44898
Change-Id: Ia8f3a5ad2971dfb6baeefb0d2f9c6998af0d897e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192611
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-03-24 12:10:09 +00:00
Paul Berry eb37227666 Flow analysis: implement "why not promoted" logic for logical binary operators.
Bug: https://github.com/dart-lang/sdk/issues/44898
Change-Id: If03750edf6bdf13fc2677e0c09f49f70d0da744e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192608
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-03-24 12:10:09 +00:00
Paul Berry 6c665c4607 Flow analysis: implement "why not promoted" logic for most binary operators.
`&&` and `||` will be addressed in a follow-up CL go through a
different code path in the analyzer.

Bug: https://github.com/dart-lang/sdk/issues/44898
Change-Id: I20732ceceb113017a0b1e77134b1e28c4c924fbb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192607
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-03-24 12:10:09 +00:00
Konstantin Shcheglov 4a04e0ae3d Prepare to publish analyzer 1.3.0 and _fe_analyzer_shared 19.0.0.
Change-Id: Ic0983c724e01ca11d1eb72cd9e5424a74874dcc9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192862
Reviewed-by: Kevin Moore <kevmoo@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-03-24 06:13:43 +00:00
Konstantin Shcheglov 6b7398227f Fix unlinked API signature for adding '=<nothing>;'.
Change-Id: Idfab6f4e977170c03f0e75476e3524c9312b01ed
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192860
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2021-03-24 04:08:47 +00:00
Konstantin Shcheglov edec078c89 Return the actual first token from VariableDeclarationListImpl.firstTokenAfterCommentAndMetadata
Otherwise we cannot find the node when using the offset of `const` token.


Bug: https://github.com/Dart-Code/Dart-Code/issues/3205
Change-Id: Ida8dbc0bd48f4ae4c857d2ffd236b80a1c6cbc74
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192840
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-03-24 03:22:23 +00:00
Konstantin Shcheglov 2371d74664 Use single quoted string in AnalyzeCommand.
TBR

Change-Id: I0f0d908df54d69763b4588d857852aa560a982a6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192861
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-03-24 02:02:08 +00:00
Konstantin Shcheglov df59fd9a3e Issue 45127. Fix for metadata on enum constants.
Bug: https://github.com/dart-lang/sdk/issues/45127
Change-Id: I8e98bc5fd0ba1e04cd88c3a175a08f67034ebb82
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192763
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-03-24 01:10:51 +00:00
Ben Konyi a49bea950d [ CLI ] Use 'project' instead of 'package' in CLI help messages
Initial updates, related to
https://github.com/dart-lang/sdk/issues/45279.

Change-Id: I459e719ad6e92378f9240a612e0bd8229d0fcb2e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192727
Reviewed-by: Devon Carew <devoncarew@google.com>
2021-03-23 23:05:33 +00:00
Joshua Litt fd4eefc22d [dart2js] Move determination of fragments to emitter phase.
Change-Id: I0aaf02a8900445fc76b87de17e21b6488ca2fe46
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/191240
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2021-03-23 21:55:53 +00:00
Konstantin Shcheglov 7f3f3e66ac Skip BazelChangesTest on Windows.
Change-Id: I88259cf2d101c80b35b16bec5cdefd3dc85a5356
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192762
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-03-23 21:24:01 +00:00
Ben Konyi 5e88959488 [ Service ] Deprecate CpuSamples.timeSpan
The implementation of CpuSamples.timeSpan has never matched the
specification and has never been returned properly from the service
(returned as 'timespan' instead of 'timeSpan'). Since timeSpan is
effectively the same value as timeExtentMicros, timeExtendMicros should
be used instead.

Fixes https://github.com/dart-lang/sdk/issues/45276

TEST=N/A

Change-Id: I3a1fda81e199718824ad80eb955adb3214ae192c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192780
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2021-03-23 21:23:31 +00:00
Brian Wilkerson 9b8f93b7a1 Ignore text that is not a valid error code in ignore comments (take 2)
I considered doing the bigger refactor I described in the first CL, then
I realized that I can't because the constructors for `ErrorCode` are
`const`. We should still have some kind of tests, but they won't be as
complete as we might hope.

Change-Id: I02f397642a367af2823f67b90ffdca2113fdb8e5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192725
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-03-23 20:22:51 +00:00
Sam Rawlins 78121c713e dev_compiler: Remove unused imports
Bug: https://github.com/dart-lang/sdk/issues/44569
Change-Id: I3fe1093fbd0a01e1dc5e99750c4c7e9441c3d056
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192610
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-03-23 20:13:13 +00:00
Sam Rawlins 6e63b8b8b8 analyzer: ErrorFilterOptionValidator improvements
* error codes are static and final; no need for a public getter
* lint codes are `late final` because they may be registered up until the
  options are validated; the field is lazily calculated at such time.

Change-Id: I8d9c1e9ab4d69be77be49b44f62e605c3f06fd2e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192561
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-03-23 20:07:41 +00:00
Sam Rawlins d693078bbf Analyzer: new diagnostic: UNNECESSARY_QUESTION_MARK
`null` is already a valid value of `dynamic` and `Null`, so adding a question
mark to make `dynamic?` or `Null?` is unnecessary, and could lead to confusion.

Fixes https://github.com/dart-lang/sdk/issues/45165

Change-Id: I710ff12935767dd635edfdb026033aa8e27e7804
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190041
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-03-23 19:55:11 +00:00
Konstantin Shcheglov e8d7058f16 Include debug data for state error in ResolvedLibraryResultImpl
Bug: https://github.com/dart-lang/sdk/issues/45430
Change-Id: If1f75ac54dc73fa8b0fe6fc0666acd48b3ff1357
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192761
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-03-23 19:28:01 +00:00
Konstantin Shcheglov 85f460594b Include debug data for NPE in _ContextTypeVisitor
Bug: https://github.com/dart-lang/sdk/issues/45429
Change-Id: Ibb8a72666eaa7af16a4bb173526f16c7bab14c1c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192760
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-03-23 18:57:01 +00:00
Brian Wilkerson bd19cbf1d2 Add a json format to the dart analyze command
Change-Id: I5667d845d305fa087934f73fbf09cc9b166c8461
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192240
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2021-03-23 18:21:51 +00:00
Stephen Adams 20bdf38514 [dart2js] Fix variable allocator live-range bug
The controlling condition of a control-flow operator (?:, &&, ||)
needs to have the same live range as the other operands.

Change-Id: Iee999a1b400ef35ccbb761fcd7266952c9a95be9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192605
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2021-03-23 15:38:36 +00:00
Stephen Adams 93313bf12d [dart2js] Fix stack overflow on optimizing '%'
The back-edge test failed to take into account that a block can have a
back-edge to itself.

Fixed: 45413
Change-Id: Ib623e6baa2c1de6df131fc67462978a042df5a4e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192606
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2021-03-23 15:37:46 +00:00
Sam Rawlins 07bb38c8c6 analyzer: Report INVALID_SECTION_FORMAT in 4 more places
* Invalid section (not a Map) under `analyzer: errors:`
* Invalid value (not a Scalar) under `analyzer: errors:`
* Invalid section (not a Map) under `analyzer: strong-mode:`
* Invalid section (not a Map) under `analyzer: optional-checks:`

Change-Id: Iad0b33d312f65af8a995677fe4e57389fea520c9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192600
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-03-23 15:20:47 +00:00
pq 706758a142 linter 1.2.1
Change-Id: I4d2ccc0bcc4128d60d76ea5119594d946fec35c3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192483
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2021-03-23 15:01:16 +00:00
Tess Strickland e7d3a6027c [vm] Create more Function helper methods for code clarity.
Creates HasParent() as a predicate for Function objects with a non-null
parent function and makes IsLocalFunction() specific to local closures
(i.e. explicit closures with non-null parent functions).

Creates HasSavedArgumentsDescriptor() as a predicate to determine when
saved_args_desc() can be used, to avoid the caller having to do explicit
predicate checks for each dispatcher type that contains one.

Also simplifies Function::PrintName, creates different suffixes for a
SyncGenClosureMaker and its associateed SyncGenClosure, adds suffixes
for skipping more than one generated body when printing the parent name,
and changes ArgumentsDescriptor::PrintTo to match the compact syntax
Function::PrintName used for signifying the arguments descriptor for
certain dispatchers.

TEST=pkg/vm_snapshot_analysis/test/instruction_sizes_test

Cq-Include-Trybots: luci.dart.try:app-kernel-linux-release-x64-try,vm-kernel-precomp-linux-release-x64-try,pkg-linux-release-try
Change-Id: I0ac1226d1ffe1d81743b5c6788da170d5a4010c5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/191560
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2021-03-23 12:21:26 +00:00
Johnni Winther 92e237c835 [cfe,dartdevc,dart2js] Use InstanceGetterInvocation for getter/field invocation
The web compilers don't support getter/field invocation encoded as a
FunctionInvocation on an InstanceGet because it doesn't work for
getter/field invocation of js-interop properties, since the InstanceGet
wouldn't result in a Dart function but just JavaScript function.

To support this in the new method invocation encoding, a special
expression, InstanceGetterInvocation, is used to encode getter/field
invocations in dart2js and ddc.

Change-Id: I21da8e8686f66ae4ce4d44245073b9e424f975b9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192181
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2021-03-23 09:49:06 +00:00
Jens Johansen 22551d35c2 [CFE/dart2js] Don't set exit code to 1 in unit tests running analyzer
The testing system - sometimes (see http://dartbug.com/45408) - exits
and turns the bot purple when the exit-code from a test is (e.g.) 1.

This CL removes some instances of having an exit code of 1.

Change-Id: Ic831d151346a28dabe9180e80a8e462af227bf41
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192381
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-03-23 08:36:56 +00:00
Johnni Winther 0de315c146 [cfe] Compute variance for type parameters on duplicate typedefs
Change-Id: I6e4a05911c77d26f1fb440ec8e90c13e783926e9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192147
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2021-03-23 07:32:26 +00:00
Konstantin Shcheglov 0c4fdb9ca4 Fix two Windows bot failures.
TBR

Change-Id: I3cda819e1deb953e0d899430f4e363541c4fef15
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192660
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-03-23 04:24:55 +00:00
Anna Gringauze 9b901bc21f Communicate start failures from ExpressionCompilerWorker to the consumer
In some cases, such as file system exceptions,  ExpressionCompilerWorker
fails to start but does not close its receiver port, which causes the
consumer to wait indefinitely for responses.

Make ExpressionCompilerWorker communicate the failure to the consumer,
close the receiver port, and exit.

Added tests to verify graceful exit.

Issue that uncovered the bug: https://b.corp.google.com/issues/183218372

Change-Id: I54a9c3620cfc5f77c101b26b4e98b6eeb03ad7e1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192260
Commit-Queue: Anna Gringauze <annagrin@google.com>
Reviewed-by: Gary Roumanis <grouma@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2021-03-23 02:27:55 +00:00
Mark Zhou 5eceb354e2 [dartdevc] Porting expression compiler tests.
This is part of a series of changes to add support for SDK expression eval tests.

Change-Id: Ia96931fdf81324fa131014b49ec2067507c451f2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/191022
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Anna Gringauze <annagrin@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
2021-03-22 23:17:55 +00:00
Paul Berry 77fbd1d6e5 Migration: avoid crash on unreferenced part files.
Fixes #45369.

Bug: https://github.com/dart-lang/sdk/issues/45369
Change-Id: Ic414de3c002f8993567eed39e049d90ea741b381
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192520
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2021-03-22 22:55:45 +00:00
Paul Berry 7655529252 Sort declarations in migration_cli_test.dart
Change-Id: I2cc6e3d5fd4de62aaf4ba2144432094951843837
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192484
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2021-03-22 22:55:45 +00:00
Ben Konyi 3b49fd862b [ VM / Service ] Add identityHashCode to @Instance and Instance
responses

Allows for comparing @Instances and Instances with allocation traces and
heap snapshot entries.

TEST=pkg/vm_service/test/get_allocation_traces_test.dart

Change-Id: I6d021b0267f1595332475470961df6e35321ce80
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/188600
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2021-03-22 22:45:57 +00:00
Kallen Tu 9e5a6c1568 [cfe] Do-while statements for const functions.
Change-Id: I881fb535ef76e564ab76c5fc661d3adbbe5aed0f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192401
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2021-03-22 22:19:45 +00:00
Konstantin Shcheglov 86c5085565 Fix NPE when the return type of a method is inherited.
Change-Id: Iaf77f250c806b116f0f0d6bbd3d9b9ff2ab0090d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192540
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-03-22 21:03:45 +00:00
Sam Rawlins e890c2ab91 analyzer: Add failing test case for deferred element in annotation argument
Bug: https://github.com/dart-lang/sdk/issues/45418
Change-Id: I6332caab0ecc5604d0631f4669314355f699b720
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192485
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-03-22 20:49:52 +00:00
Konstantin Shcheglov 90a5a21267 Issue 45411. Remove hasNoSuchMethod check, already done in inheritance manager.
Bug: https://github.com/dart-lang/sdk/issues/45411
Change-Id: I0eda15a0d51164c897a1a6c555b1b1f127fb887e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192501
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-03-22 20:49:45 +00:00
Sam Rawlins d382ad0896 analyzer: Add new test for deferred type argument in annotation
Change-Id: Ibf29aec03ee912657142bba574309e0e9eeaedd3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192486
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-03-22 20:41:50 +00:00
Sam Rawlins f578bafad7 analyzer: add generic-metadata test case to argument_type_not_assignable tests
Also refactor these tests, in order to get the right experiment. Factor out
common test cases into a mixin, leave two test classes, one of which opts out
of null safety.

Existing tests are left alone except that two which were failing are no longer
failing (simple change in span or diagnostic code).

Change-Id: I2b0dfb4c1df38c6fbd76e5490bbbbd41653edc1d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192502
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-03-22 20:41:40 +00:00
Sam Rawlins b047c6e188 Remove unnecessary imports from analysis_server
Bug: https://github.com/dart-lang/sdk/issues/44569
Change-Id: I71f28e7b8b56bde11c9b2f349b05534bd4851a76
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192503
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-03-22 20:33:47 +00:00
Sam Rawlins bda604e45d analyzer: Remove unnecessary import
Bug: https://github.com/dart-lang/sdk/issues/44569
Change-Id: I5c12609a1a139be9d9eee015d593e57c89340d30
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192487
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-03-22 20:33:37 +00:00
Joshua Litt 6f6afa4dba [dart2js] Add component detection to deferred fragment merge.
This is to avoid merging unrelated code into language files.

Change-Id: Ief514d0761fbb471a0460c78db35c0a07bf78f6d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/191800
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2021-03-22 18:57:24 +00:00