Commit Graph

36564 Commits

Author SHA1 Message Date
Konstantin Shcheglov dfd7d7b37a Deprecate NodeList<TypeName> getters and replace with NodeList<NamedType>.
Change-Id: I6a772a7bca75e9c2ab4b3612d51c04ea6114ed6d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214130
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-09-22 16:25:56 +00:00
Johnni Winther 6c4b75237a [kernel] Rename isFieldFormal to isInitializingFormal
+ update ast-to-text, including previous renames of covariant

TEST=existing

Change-Id: Ia29847cba791096ccd9c6c383a1b633a6150cd94
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214042
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Chloe Stefantsova <dmitryas@google.com>
2021-09-22 15:56:07 +00:00
Konstantin Shcheglov fdf5014697 Get the language version of BazelWorkspace from the dart/build_defs/bzl/language.bzl
Presubmit looks green.
https://fusion2.corp.google.com/presubmit/tap/398141496/OCL:398141496:BASE:398160873:1632289516597:2c6df414/targets

Change-Id: Ibe12b4d0709cd38be0307a6c211962dca7a69de6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214075
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-09-22 15:17:47 +00:00
Konstantin Shcheglov 34f1bddb88 Replace TypeName with NamedType in AstTestFactory.
Change-Id: I9920d1a3394c179a066f8a8ab339284e682175ea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214129
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-09-22 15:01:59 +00:00
Konstantin Shcheglov 3d0a6845e4 Rename TypeNameTracker to NamedTypeTracker.
Change-Id: I097f5267d0bbc172f68ec685d35d3cee09312fb8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214128
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-09-22 14:54:16 +00:00
Konstantin Shcheglov e0518b47cf Rename TypeNameResolver to NamedTypeResolver.
Change-Id: Ifd26abf211be47b3e65482d038eceb966a686fa4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214127
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-09-22 14:53:57 +00:00
Lasse R.H. Nielsen 18f37dd8f3 Add extension name getter on Enum.
We use an extension getter instead of an instance getter because
it doesn't conflict with any potential existing or future enums
which want an element named `name`.
Keeping the namespace for enum elements open is a priority.
We currently only reserve `index` and `values`.

BUG: https://github.com/dart-lang/language/issues/1511

Fixes language issue #1511, which is a long-standing request,
and should replace a number of alternative implementations
which are based on parsing the `toString()`.


This version has two fields on the shared superclass, the index
and private name, and has a separate `toString` for each `enum` class
which hard-codes that enum's class name.

An earlier version had both `"name"` and `"ClassName.name"` as fields
to be able to reuse the same `toString` method on all enum classes,
but that cost too much for JS compiled code.
Even having just `ClassName.` as a field and then combining inside
`toString` requires more code to create the enum instances.
Instead this version hardcodes the `ClassName.` string once
in the `toString` method, which means each enum class has its own
toString (which can *potentially* be tree-shaken then.)

This still tree-shakes slightly worse than the previous implementation
where every enum class had its own `index` and `_name` fields
independent of each other, which could then be tree-shaken independently.
However, the `index` was already made an interface member with the
addition of the `Enum` interface, so code which accesses `.index`
on something of the `Enum` supertype could prevent tree-shaking of
all enum classes' `index` fields.
Likewise any general access to the "name" of an enum would necessarily
do the same for the name.
This CL makes up for some of that by sharing more implementation
between enum classes.

DartVM AOT CodeSize impact: ~0.15% regression on gallery (little less on big g3 app)

TEST= New tests added to enum_test.dart

Change-Id: Id25334e6c987f470f558de3c141d0e3ff542b020
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210480
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2021-09-22 14:20:16 +00:00
Paul Berry 24c20d4844 Lock down FfiCode.type to ErrorType.COMPILE_TIME_ERROR.
Previously, the FfiCode constructor allowed the error type to be
overridden, but no use of that constructor actually took advantage of
it.

Hardcoding the type of all FFI error codes makes the implementation of
error codes more uniform, which helps pave the way for code
generation.

If in the future, we decide that we actually need some FFI error codes
to have different error types than others, we can always add the
functionality back in.

Change-Id: I5061281089aeba0185fd8ebaa08a82482e91f2ca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214070
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2021-09-22 12:31:26 +00:00
Chloe Stefantsova 684e8cf9f7 [cfe] Distinguish between call-site access kind in shown members
Change-Id: Ie893e1b9ef46ccfb3a86393cec4342845af49f2a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213765
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Chloe Stefantsova <dmitryas@google.com>
2021-09-22 10:13:37 +00:00
Alexander Thomas 63932dc7d3 [testing] Fix logic for detecting invalid named configurations
* Fix regression (https://dart-review.googlesource.com/c/sdk/+/214040).
* Add tests for invalid configurations with and without named configs.
* Add a custom test matrix for testing.

Change-Id: If169571c3163c5f4da1d3d989a2fcff6dc0a7d97
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214044
Commit-Queue: Alexander Thomas <athom@google.com>
Commit-Queue: William Hesse <whesse@google.com>
Auto-Submit: Alexander Thomas <athom@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2021-09-22 09:34:46 +00:00
Konstantin Shcheglov 8aa9716d36 Replace TypeName with NamedType in nnbd_migration/, where possible.
Change-Id: I8031e1f7f0192e211598a806b3ba4244784b6b27
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214122
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-09-22 01:27:37 +00:00
Konstantin Shcheglov 8ecbaa8393 Replace TypeName with NamedType in analysis_server/, where possible.
Change-Id: Ice232aed2b705030861afa115350b1c77aa49d6e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214121
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-09-22 01:26:39 +00:00
Konstantin Shcheglov b8877d1f5a Replace TypeName with NamedType in analyzer_plugin/, where possible.
Change-Id: I979e904fc54fef6dfc42cb999ac72fefb669f462
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214123
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-09-22 01:26:21 +00:00
Konstantin Shcheglov 6fc5d5956d Replace TypeName with NamedType in AstFactory.
Change-Id: If3ef21313321725728fa716c06462138e42435a0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214140
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-09-22 01:26:11 +00:00
Konstantin Shcheglov 056a6cae31 Replace more references to TypeName with NamedType.
Change-Id: I6981aac2ca0d17bd3dd75c37689ef66319214cc2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214120
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-09-22 00:34:30 +00:00
Riley Porter 82e8948ddc Add external extension fields, getters, and setters.
CFE transformation to add a function body for external fields,
getters, and setters, routing to the relevant js_util
getProperty and setProperty optimized calls.

Change-Id: Ia3d0f05fda50f20d217c0a67e0fd636bb774000b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213600
Commit-Queue: Riley Porter <rileyporter@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
2021-09-21 22:56:18 +00:00
Konstantin Shcheglov f5c114ad66 Remove AnalysisDriver.onCurrentSessionAboutToBeDiscarded
Change-Id: I283469662c5edab7ec1cf7f9ab37587cd4758211
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214062
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-09-21 21:30:31 +00:00
Konstantin Shcheglov 8495d8b591 Rename FindNode.typeName() to namedType().
Change-Id: Idc0a2ef9cd5bddda345e9a7e603145c7d3ee2a38
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214063
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-09-21 21:30:28 +00:00
Konstantin Shcheglov b41ae230a2 Replace many casts to TypeName with NamedType.
Change-Id: I485b7a3e268c59c435f02e3357dc5dcf256e627e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214067
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-09-21 20:32:38 +00:00
Paul Berry 201ee847fe Migration: Properly handle awaits of custom future classes.
Bug: https://b.corp.google.com/issues/200651131
Change-Id: Ia06066783a9107848f85bc234b7612a55f54c9c9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214069
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2021-09-21 20:29:07 +00:00
Konstantin Shcheglov dc5eec2c5a Issue 46103. Resolve type arguments of TypeName(s) - there might be expressions.
Bug: https://github.com/dart-lang/sdk/issues/46103
Change-Id: Ia847403c7609f289f3f3f8bd5cd10e221216993f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214101
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-09-21 17:23:18 +00:00
Konstantin Shcheglov 9220ce35cb Fix cases where TypeImpl.toString() is used.
Instead getDisplayString() should be used.

Change-Id: I1c988bc9d193398aadbb32620e01f11ea3e353d4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213900
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-09-21 15:16:22 +00:00
Konstantin Shcheglov 0c893bfd7f Rename assertTypeName() to assertNamedType().
Change-Id: I959da4662efccdb1d89fbf13eb23220439e6dd34
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213980
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-09-21 15:00:22 +00:00
Stephen Adams 5c719b3bd3 [dart2js] Simplify message templates
Change-Id: I8e3f33664a3e7944e1b2d6bcf09bebd74c7b826e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214003
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-09-21 12:45:02 +00:00
Alexander Thomas b3cfd293ad [infra] Allow arm64c on Android configurations
* Fail test.py if an invalid named configuration is used.

Cq-Include-Trybots: luci.dart.try:vm-ffi-android-product-arm64c-try
Change-Id: Ib700511a639ee39fd58441dd6fee8bd6dad8c2e5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214040
Reviewed-by: William Hesse <whesse@google.com>
2021-09-21 10:15:29 +00:00
Stephen Adams 0071b38172 [dart2js] dart format --fix in kernel/
Change-Id: Iab8c98930c6add208679074c562f129e797af780
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213970
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2021-09-21 02:01:08 +00:00
Mayank Patke 35421c5d1a [dart2js] Update MethodTypeInformation to narrow the return type of
_lateReadCheck.

Change-Id: If76a5b34cfd9da9721bfa0d8642b018a4af131dd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213901
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2021-09-21 01:59:45 +00:00
Stephen Adams 9872fd192e [dart2js] Modernize allocations in js_emitter/
Change-Id: Iecdde5c8940ede24f4ac428a624984a0b2ca4f97
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213963
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
2021-09-21 01:05:15 +00:00
Stephen Adams 048dd185c6 [dart2js] Modernize allocations in js_model/
Change-Id: If93776e2f556e8d7adfdbe5e3603f7477e0486f8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213902
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2021-09-21 00:22:55 +00:00
Konstantin Shcheglov 064a7cca5f Tweak the type check and remove a cast.
Change-Id: I4524e0a52300854a88bb89067e6c9c604308a118
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213961
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-09-20 21:36:29 +00:00
Stephen Adams a666e5a221 [dart2js] dart format --fix in serialization/
Change-Id: I0e14a6fad41721380fbd406104932c7a8011e4ef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213960
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2021-09-20 21:28:26 +00:00
Sam Rawlins f12333dfa0 Resolve more cases of .call; correct many cases of PropertyAccess receivers
Fixes https://github.com/dart-lang/sdk/issues/47211

Much of this change is about decision-making based on the _type_ of the
function in a FunctionReference, or the receiver of that function, in the
case of prefixed identifiers or property access.

Previously, there was a rule that only direct references to functions
(top-level, local, and method) could be torn off and type-instantiated.
That rule has been reversed (#1812), so a lot of unraveling has to be
done here.

`e.call<...>` is now legal for _any_ generic function-typed expression
`e`, which certainly may be an expression without a staticElement.
Additionally, `e<...>` is now legal for _any_ generic function-typed
expression `e`.

Because we no longer resolve PropertyAccess piecemeal, we no longer
report UNDEFINED_IDENTIFIER or UNDEFINED_PREFIXED_ELEMENT etc before
deciding to check if a tearoff is being made on a function-typed
element. The unfortunate side-effect here is some redundant
error-reporting. :( I've left TODOs.

Change-Id: I62106332e39d528cbd7cdfa5ec831dc56b394b52
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213800
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-09-20 20:17:35 +00:00
Sam Rawlins 5c83d863ef Delete 3 classes from analyzer's deprecated parser
Change-Id: I8aec6064215969023d23a871e10c1aa22fdc2f7a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213848
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-09-20 19:16:04 +00:00
Sam Rawlins c260f251a7 Remove redundant imports from compiler
In many files, there is a redundancy in importing

    import 'package:compiler/src/common.dart'
    and
    import 'package:compiler/src/diagnostics/diagnostic_listener.dart'

I chose to remove the latter import.

Bug: https://github.com/dart-lang/sdk/issues/44569
Change-Id: Ia6c871080bf2d7c637694a4fe5cb1b84e540b789
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213851
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-09-20 19:14:33 +00:00
Stephen Adams cc73b9001f [dart2js] dart format --fix in inferrer/
Change-Id: I105784a65c1f4c0748bab157522af3bcc2aad066
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213862
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2021-09-20 19:06:13 +00:00
Joshua Litt dffb06bca9 [dart2js] Address some feedback in algorithm_state.dart.
Change-Id: I9c96ca7294318d7f28f692791ba5ce9518f18f97
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212023
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2021-09-20 19:03:23 +00:00
Stephen Adams 427af76e0b [dart2js] dart format --fix in js_emitter/
Change-Id: Ib4ba65b922ef687adc355c41b3ae23d337659f30
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213863
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2021-09-20 18:40:13 +00:00
Konstantin Shcheglov 45bfa70348 Put the path back into file not found exception.
Its absence causes a dartdoc test failure.

Bug: https://github.com/dart-lang/sdk/issues/47220
Bug: https://buganizer.corp.google.com/issues/200468974
Change-Id: I0fe8af902cd9a11abb0102ce4744c57f1738ab5f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213880
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Janice Collins <jcollins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-09-20 18:39:27 +00:00
Stephen Adams 552573ac93 [dart2js] dart format --fix on ir/
Change-Id: Iae34547b8ea7840fdd7b6e5c3b95e8ee4ca3e670
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213861
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2021-09-20 18:31:25 +00:00
Stephen Adams 6e3de72138 [dart2js] dart format --fix on js_model/
Change-Id: Id06c441e16c2a0d8df96e9d525ce887f269e4e15
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213860
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2021-09-20 18:24:03 +00:00
Stephen Adams d4385e620d [dart2js] Modernize allocations in js_backend/
- Use `{}` syntax for Maps and Sets
- Remove type arguments on right side of initializations with same
  type arguments.
- A few cases of replacing conditional code with `??`/`??=`.

Change-Id: I1b58a109b1f8ea8458f37a2de256ffb3dc9956b1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213853
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2021-09-20 18:23:23 +00:00
Paul Berry b2347f66ce Fix reporting of CompileTimeErrorCode.PRIVATE_SETTER
The error code text is:

    The setter '{0}' is private and can't be accessed outside of the
    library that declares it.

So when instantiating this error we should only provide a single
argument.  Previously we were providing a second argument that was the
name of the type.

Change-Id: I952dec86f079b9e17e071d37895c3b38c715cf4f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213826
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2021-09-20 17:52:53 +00:00
Paul Berry 3ae5055f75 Translate named placeholders to positional in generation of syntactic_errors.g.dart.
Previously, if a CFE error contained a placeholder (such as
`#string`), that wasn't converted to the equivalent analyzer
placeholder, which meant that analyzer error reporting logic needed to
know whether the error being reported came from the CFE or the
analyzer in order to report the error correctly, otherwise the
placeholder text would just show up verbatim in the analyzer output.

Change-Id: If875de3a1a80048700b0edf458377c5fc87a15d0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213281
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-09-20 17:51:40 +00:00
Konstantin Shcheglov 4d3f45db2c Issue 47241. Fix FunctionExpressionInvocation of a cascaded getter.
Bug: https://github.com/dart-lang/sdk/issues/47241
Change-Id: I8f6c7e418970f3a696df2561ba3a62cffb8e23a7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213843
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-09-20 17:36:37 +00:00
Sam Rawlins 08bb058e72 Remove redundant import from _js_interop_checks
Bug: https://github.com/dart-lang/sdk/issues/44569
Change-Id: I6fa385eddc76397ce4944674bd548a16755f265d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213850
Auto-Submit: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Riley Porter <rileyporter@google.com>
Reviewed-by: Riley Porter <rileyporter@google.com>
2021-09-20 16:58:24 +00:00
Paul Berry 204338d17c Fix reporting of HintCode.INVALID_VISIBLE_FOR_OVERRIDING_ANNOTATION
The hint code text is:

    The declaration '{0}' is annotated with 'visibleForOverriding'. As
    '{0}' is not an interface member that could be overriden, the
    annotation is meaningless.

So when instantiating this error we should only provide a single
argument.  Previously we were providing a second argument that was the
name of the annotation; this is unnecessary because the error message
already mentions the annotation name ('visibleForOverriding').

Change-Id: I022af6914668ad6232005237619b3ab9a5d7a589
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213825
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2021-09-20 16:51:51 +00:00
Brian Wilkerson 98d28c08ee Improve the highlight range for non_sized_type_argument
Change-Id: I1c54df8e8f5c167fdb87053cca181cd52ee6f853
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213823
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-09-20 16:50:21 +00:00
Sam Rawlins d6f0e39f30 Remove redundant import from dev_compiler
Bug: https://github.com/dart-lang/sdk/issues/44569
Change-Id: Iab83d15b0f6c5448b75881fcba8c8ea177feab71
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213852
Auto-Submit: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2021-09-20 16:37:41 +00:00
Brian Wilkerson e061501495 The diagnostic wrong_number_of_type_arguments_function does not have published docs
It was incorrectly marked as having them. Attempting to navigate to docs
opens the correct page but there's no docs to open to so it leaves the
page scrolled to the top.

Change-Id: I862fa215ee59e8aa1200a7e33186e91528b8ef19
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213840
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-09-20 15:54:03 +00:00
Sam Rawlins 9f0c408376 Remove redundant imports from front_end
Very often there were two imports of the same URI, one of which also
had a `show` combinator. I opted to remove the other one.

Bug: https://github.com/dart-lang/sdk/issues/44569
Change-Id: I1263c892f94f0645fda6dee371dfc1fcddcd2344
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213846
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-09-20 15:33:43 +00:00