Commit graph

8194 commits

Author SHA1 Message Date
Paul Berry ec2823d052 Make an interface type to represent promotable variables.
And updade flow analysis clients to use this interface, so that we
have no risk of accidentally trying to promote things that shouldn't
be promotable.  (Previously we used VariableElement, which would have
allowed fields).

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

Change-Id: I225d3adabea503ca7eb9042516cf95d5a257fec6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119162
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-09-27 20:54:00 +00:00
Konstantin Shcheglov 9bf38afe9c Check that ClassElement is Object using the corresponding getter.
Bug: https://github.com/dart-lang/sdk/issues/38589
Change-Id: I76c510bd212c48dbb3efc6b2ca2156d187937fa1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119181
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-09-27 18:31:25 +00:00
Konstantin Shcheglov 18f941d9e0 Fix for the ordering and caching issue for default types.
TypeParameterElement caches its default type, as it gets it from the
resolved TypeParameter node. So, while DefaultTypesBuilder will get
to the node from which we got this default type, and will finish its
building from TypeBuilder to a normal DartType, it is too late. We
should make sure that we only cache already built types.

R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/38498
Change-Id: Ie3e3645efdf44a9e599655bec5a5e410c75c1a58
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119166
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-27 18:20:00 +00:00
Paul Berry 605422c94e Flow analysis: Make TypeSystemTypeOperations public so it can be reused.
Change-Id: Ia5d494f6e4042fbb018a8b5c041b2ba07043f525
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119161
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-09-27 16:35:24 +00:00
Brian Wilkerson 61b4c0f770 Cleanup hints and lints in analyzer packages
Change-Id: I7f1a6ad1ed3610da9616683576ebfb5efd543fd9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119164
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-09-27 16:12:44 +00:00
Brian Wilkerson 349e861fd3 Enable urls for codes with recently published docs
Change-Id: I327c996d54e9281338e1b986844c4fc3f1b42803
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119103
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-09-27 14:17:30 +00:00
Jens Johansen c3c31b74fd [parser] Fix bug wrt when the handleNonNullAssertExpression is added
This fix is basically a revert of the first fix for for the same issue,
627e4c8cad

Fix #37708

Bug: 37708
Change-Id: Ic470b2663e7171fcac6a8de3d9e1276b7815a64b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118574
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-09-27 11:53:15 +00:00
Sam Rawlins 3637e78014 Report inference failure on return types of typedefs and generic function types
Change-Id: I9da541785f75c0da5121bb7058d3ad726ff00e12
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117522
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-09-27 06:21:43 +00:00
Devon Carew 40cc975932 Increase the severity of the unused_import hint (to a warning).
Change-Id: Ie65eb7e9c0f48c54a1c537e821c88a5ea8451266
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119101
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2019-09-27 02:10:22 +00:00
Konstantin Shcheglov eac2eadff7 Stop using 'Element.type' in resolver.
Change-Id: I90ed74e2c673544f3eae903859fb3b9e4c284240
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119082
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-26 23:55:02 +00:00
Paul Berry 1375e262be Minor NNBD fixes for type algebra and DartType.toString.
Change-Id: Iafb43852d5fad65a37a58b132a066b6aa3492da1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119062
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-09-26 21:51:12 +00:00
Konstantin Shcheglov 402951b399 Stop using 'Element.type' in ErrorVerifier.
Change-Id: I8313bccb7bf302fd80fa2da1e5256e1e40998fa8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119041
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-26 20:17:28 +00:00
Sam Rawlins e6eafe20f7 Fix strict inference on overriding methods and setters.
See the change to the spec: https://github.com/dart-lang/language/pull/595

Change-Id: I5aeb20eb175f7018ecc99f398ea4d463b1e7874e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118920
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-09-26 19:29:22 +00:00
Kallen Tu 327bc451f8 Added variance support in listeners to ast.
Pass variance data to field in TypeParameter through the listeners.
ast_to_text will print variances for classes and mixins if specified.

Avoids serialization/deserialization (impl in future CL).

Change-Id: I298537604823710f0d30001f4cb5f1e81530959f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118464
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-09-26 18:11:10 +00:00
Konstantin Shcheglov 38a3a6b6cb Don't use '.type' in TypeParameterMember.
R=brianwilkerson@google.com

Change-Id: Icd481da622f226aa0e12c0f1f91820ce6c3a0537
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118889
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-26 17:19:42 +00:00
Brian Wilkerson 3c18db7d9e update analyzer error message generator to generate hasPublishedDocs
Change-Id: I87fae43033876c84448e785417bd5a72efe52ef9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118180
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-09-26 17:11:02 +00:00
Sam Rawlins 9c8de83ced Fix strict-inference for function expressions which can properly infer
Change-Id: I881476f78e9c76650cb576c321ecb0959dce5882
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118909
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-09-26 02:53:12 +00:00
Konstantin Shcheglov 8dcf5cb413 Remove IncrementalAstCloner and TokenMap.
R=brianwilkerson@google.com

Change-Id: I0ccc3bcd3134a65821e6464cd1e60ac12d90e295
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118885
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-09-26 00:59:42 +00:00
Konstantin Shcheglov bd3792e714 Remove unused MapIterator and implementations.
R=brianwilkerson@google.com

Change-Id: If433e5d7065b6635f8b9bfca1c495f16455dc68c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118883
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-25 22:13:07 +00:00
Konstantin Shcheglov fa879f2b18 Stop using ClassElement.type in ElementResolver, infer annotation constructor type arguments.
Change-Id: Iea0ac4f9cd9c83c36058b96040f03eae9725abaa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118901
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-09-25 22:08:22 +00:00
Konstantin Shcheglov cd51a30805 Remove deprecated 'assertErrorCodesInCode'.
R=brianwilkerson@google.com

Change-Id: I57dd2644c42a5a9751a0c16b37ce9b80773aa7d1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118904
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-25 21:13:25 +00:00
Konstantin Shcheglov d1256a23f9 Deprecate 'useDart2jsPaths' in SdkLibrariesReader and make it optional.
So, we can stop using it internally, and don't tie up landing
breaking changes and other changes to internal code.

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

Change-Id: I09f36fa5b48fb03b040023d8c96353a9100d6586
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118882
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-25 21:09:35 +00:00
Sam Rawlins 344b30e8ce Enable pedantic 1.8.0 in analyzer, analysis_server
Since some pedantic issues were individually enabled, this CL turns our
analysis_options files into something more like "pedantic lints,
except ...". Effectively, this _adds_ the following lint rules:

* avoid_empty_else
* avoid_relative_lib_imports
* avoid_shadowing_type_parameters
* avoid_types_as_parameter_names
* library_names
* library_prefixes
* null_closures
* prefer_contains
* recursive_getters
* type_init_formals
* unnecessary_null_in_if_null_operators
* unrelated_type_equality_checks
* use_rethrow_when_possible

It also documents (for some rules) how many violations certain rules have.

Change-Id: I79a2c101ae4d10215d3f232d9e511bf8e6c7faa4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118720
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-09-25 19:08:03 +00:00
Paul Berry 39a1baef6b Prepare to publish analyzer 0.38.4
Change-Id: I251e7bde7b3423cbfb2ee6fe1150088bf44747dd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118647
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-09-25 19:00:01 +00:00
Konstantin Shcheglov b31e71e990 Revert "Issue 37608. Use instantiated FunctionType for tear-off(s)."
This reverts commit acac9ab11b.

Reason for revert: breaks source_gen, see https://github.com/dart-lang/sdk/issues/38546

Original change's description:
> Issue 37608. Use instantiated FunctionType for tear-off(s).
> 
> I was working of switching runtimeTypeMatch() to purely
> typeSystem.isSubtypeOf(), without working around dartbug.com/35993
> and dartbug.com/33441, but bots were failing. I think that was because
> of this issue with incorrect tear-off types. We have to fix it before
> switching to less generous TypeSystem.
> 
> R=​brianwilkerson@google.com, paulberry@google.com
> 
> Bug: https://github.com/dart-lang/sdk/issues/37608
> Change-Id: I1f5dfc5e86553a352d72e772e791978772fe8fa4
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118379
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
> Commit-Queue: Konstantin Shcheglov <scheglov@google.com>

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

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

Bug: https://github.com/dart-lang/sdk/issues/37608
Change-Id: Icb6bf93f9b39d3af1d13e9b103afea5364b9169a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118646
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-25 18:06:16 +00:00
Konstantin Shcheglov b325f8e965 Update checker.dart to use less Element.type
We are still call it at one place, because instantiateToBounds()
currently requires a DartType.

Change-Id: Ie9551e113e0086a87d3ec8a1bb0d59aff94c72fb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118373
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-25 18:01:20 +00:00
Konstantin Shcheglov 2bd2392e2a Remove EngineTestCase.
R=brianwilkerson@google.com

Change-Id: Ica78c0dfef239e15b3f7d8d624422017d5b8375e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118600
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-09-25 17:53:16 +00:00
Kallen Tu c3bbd6a247 Added parser recovery for multiple variance modifiers.
New error message for multiple variances and will handle recovery from
more than one variance modifier before a parameter.

Change-Id: I63ed8a7f04dd664e20d72b632b40f723aa43020f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118621
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-09-25 17:12:06 +00:00
Brian Wilkerson a2803a1b2d Add documentation for more diagnostics
Change-Id: I8270a74cc5a70dd16a46e3a7b2ff2bb822b69fb3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118820
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-09-25 16:38:06 +00:00
Konstantin Shcheglov bf361ebe19 Replace addTestFile()/resolveTestFile() pair with resolveTestCode().
R=brianwilkerson@google.com

Change-Id: Ie3289e355421b0339b012319ce39d2b8eb9569d1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118760
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-25 16:03:16 +00:00
Konstantin Shcheglov 9f0258f4b6 Include more information for 'Missing library'.
R=brianwilkerson@google.com

Bug: https://buganizer.corp.google.com/issues/141576014
Change-Id: I8bd8bf279770cbfd09b13b0a845293c91edfa899
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118703
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-25 14:56:50 +00:00
pq b686e1b84d unawaited futures
Change-Id: I4f8273dd461483c178d47c659b9be062cd673f27
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118602
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-09-24 23:42:24 +00:00
Kallen Tu 89220fd812 Variance Parsing and Syntax Support
With the experiment flag on, will properly parse the `in`/`out`/`inout`
keywords. Without it, will issue an error regarding the flag. First CL
for parsing, syntax support, no AST work yet.

Keywords only parse correctly for classes and mixins.
See test `variance_disabled_syntax_test.dart`.


Change-Id: I37d765804fa0752512abf52fa44456a173087ef0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117929
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
2019-09-24 17:21:39 +00:00
Konstantin Shcheglov fc56445218 Remove EngineTestCase.getGetter()/getMethod().
R=brianwilkerson@google.com

Change-Id: I89cde7189f33b6a4e0cd7c3a9542232dc8f2d134
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118506
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-09-24 15:45:07 +00:00
Konstantin Shcheglov c195896c84 Remove many uses of EngineTestCase.findNode()
R=brianwilkerson@google.com

Change-Id: I60c71f55f1d5e01a645b41fd0bd82282ca2eae20
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118521
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-24 14:21:19 +00:00
Konstantin Shcheglov 5a84f09a26 Remove EngineTestCase.findSimpleIdentifier()
R=brianwilkerson@google.com

Change-Id: I96dd3d62f2df4e433c79afdc41156e522a779d8d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118520
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-24 14:12:59 +00:00
Konstantin Shcheglov 11fa3e0e2b Don't extent EngineTestCase where possible.
R=brianwilkerson@google.com

Change-Id: I6489a9bbe0bd442d1356c34fcedfde811e6f9778
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118505
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-24 14:05:19 +00:00
Konstantin Shcheglov 3878118e37 Rename to visitNamedTypeBuilder() for consistency.
R=brianwilkerson@google.com

Change-Id: I288d0dde2eaf05004454d4eaa1d5f43d358c8722
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118502
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-24 14:04:39 +00:00
Konstantin Shcheglov e6092d54ae Resolve / report errors for extension overrides and index expressions.
R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/38484
Change-Id: Ie02c24c7929f736279d93e06f329b226a39835ea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118462
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-09-24 01:51:10 +00:00
Brian Wilkerson 4895185b1e Fix NPE when extension override is invoked without a call method (issue 38505)
Change-Id: Ia2ad1168441cf07e379184ad82f592701f5ef2bc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118481
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-09-23 22:42:10 +00:00
Konstantin Shcheglov 381d808686 Add UNDEFINED_EXTENSION_OPERATOR.
R=brianwilkerson@google.com

Change-Id: I5370c9cab5968e520266085e6060f29f42cbedef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118469
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-09-23 22:25:50 +00:00
Konstantin Shcheglov acac9ab11b Issue 37608. Use instantiated FunctionType for tear-off(s).
I was working of switching runtimeTypeMatch() to purely
typeSystem.isSubtypeOf(), without working around dartbug.com/35993
and dartbug.com/33441, but bots were failing. I think that was because
of this issue with incorrect tear-off types. We have to fix it before
switching to less generous TypeSystem.

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

Bug: https://github.com/dart-lang/sdk/issues/37608
Change-Id: I1f5dfc5e86553a352d72e772e791978772fe8fa4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118379
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-23 20:22:07 +00:00
Konstantin Shcheglov dbefc6c165 Issue 33300. Don't append bounds for TypeParameterType.
R=brianwilkerson@google.com, paulberry@google.com

Bug: https://github.com/dart-lang/sdk/issues/33300
Change-Id: Ib582bc2b95d4336a0e63ff14602682dcbcf0bd02
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118374
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-23 19:29:16 +00:00
Konstantin Shcheglov b4e631550f Support for UnknownInferredType in type algebra.
Bug: https://buganizer.corp.google.com/issues/141432740
Change-Id: I8b9e5887cdc5fdf7cc0d5914dcb3597af06da16f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118461
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-23 18:56:25 +00:00
Konstantin Shcheglov a683a5822f Consider '[]' and '[]=' as having the same base name '[]' for extensions.
Update ResolutionResult to be just getter and setter.
No properties, no functions.

Bug: https://github.com/dart-lang/sdk/issues/38484
Change-Id: If2b50e30eb98eb280142bbe12e4f0c31041ef652
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118342
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-21 02:33:49 +00:00
Konstantin Shcheglov 2cebdaae2c Update MockSdk to support unsafe_html lint.
The linter is a moving target, so since I last tried to use analyzer's
MockSdk, linter got new dependencies.

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

Change-Id: I97955158befd61146416c8c1069768ae1d58b018
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118323
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-20 17:41:25 +00:00
Konstantin Shcheglov db035f39cf Remove some uses of 'type' and substitute2() it types.
We also now don't try to share parts of strict FunctionType(s).
So, I'm removing the corresponding tests.
If we decid that we need this, the correct place to do this is
the type algebra.

Change-Id: I4f7d9df892f8606af8f0403358e56d4a07bdd025
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118321
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-20 16:56:15 +00:00
Konstantin Shcheglov 65078b5ee8 Stop using DynamicElementImpl/NeverElementImpl.type getter/setter.
R=paulberry@google.com

Change-Id: I928c3e81aaf10d1a5c01cce1f878996b86a45c2d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118108
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-20 00:00:19 +00:00
Konstantin Shcheglov 07922810b2 Remove writes to TypeParameterElement.type.
There is still a couple of write in type_algebra, should be changed
together with using nullability prefixes there.

R=paulberry@google.com

Change-Id: I090eae3dbd709c8bc76da6038a940f12fd9726f6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118106
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-19 23:52:44 +00:00
Konstantin Shcheglov 8d2045f336 Remove ResolutionEraser.
R=paulberry@google.com

Change-Id: I94d314c623725cc3157d8b543d9169642a5a432d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118104
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-19 23:52:14 +00:00