Sam Rawlins
566f173f0c
analyzer: Fix duplicate error-reporting with duplicate field formals
...
Change-Id: I80e158b33e7ea6ae4769b37f1a3448ebf6e061a2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129824
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-12-30 04:29:18 +00:00
Sam Rawlins
282dcb6f44
analyzer: move 'non-error' tests for 12 codes to separate files
...
Change-Id: I30e8442f48afd018467239d6c9d966d25c087284
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129704
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2019-12-30 03:40:38 +00:00
Konstantin Shcheglov
90c5eb0603
Remove 'referencingLibrary' from several Scope.lookupX() methods.
...
We don't use them, instead corresponding import namespaces don't
include private declarations.
R=brianwilkerson@google.com , paulberry@google.com
Change-Id: I727ed92a643412a90f691c6966efb90121b079d8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129827
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-12-30 00:48:18 +00:00
Sam Rawlins
b6e0845a81
analyzer: move 31 'non-error' tests to separate files
...
Change-Id: Ibeebeff73a656c5659b9dfd85d7a104ae6ae92fc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129805
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2019-12-27 20:08:05 +00:00
Sam Rawlins
d9bf32513d
analyzer: Move tests for 7 more codes to separate files
...
Change-Id: I59fcf1cc3c7e00f34f1fbd122af250948bfa2a97
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129600
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2019-12-27 14:47:15 +00:00
Konstantin Shcheglov
f979338aab
Extract TypedLiteralResolver.
...
Almost purely moving classes and methods, without desirable additional
refactorings yet.
Change-Id: I7927a432b208747addf4a561d54078da553b339b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129761
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-12-27 07:56:04 +00:00
Sam Rawlins
7737f8b948
analyzer: Move tests for 9 more codes to separate files
...
Change-Id: Id9a8fc2cda5bafeb40b8dc335e884ae57ad790fa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129564
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2019-12-27 05:59:14 +00:00
Konstantin Shcheglov
e2795c41ee
Move ResolverErrorCode codes into CompileTimeErrorCode.
...
Change-Id: Ie8a1422c86da5c4f04fbd4422a758289bf9e078c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129621
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-12-26 22:12:44 +00:00
Konstantin Shcheglov
2fb3f09948
Extract TypeProvider class into lib/dart/element/type_provider.dart file
...
Change-Id: I96cdfccc33e35a9625c14a89a08826758eac0f2c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129601
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-12-26 21:31:04 +00:00
Sam Rawlins
232a171a0b
analyzer: Move tests for 8 codes to separate files
...
Change-Id: I3092a13ecdcde820b2a35c07ddb78df08f23ae75
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129560
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-12-24 19:21:41 +00:00
Sam Rawlins
4eb896b9e4
analyzer: Move tests for 8 more error codes into separate files
...
Change-Id: I59ee527c0ff68ff7c77c7a52483ba23355dfe3ad
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129423
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2019-12-24 16:02:56 +00:00
Sam Rawlins
de6faade0f
analyzer: Move 9 more code tests to separate files
...
Change-Id: I77f4d5b50459a2cb066c90b3278c155041b5c9f7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129542
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2019-12-24 15:55:41 +00:00
Sam Rawlins
b5e1aeb4d0
analyzer: Move two tests into separate files
...
Change-Id: I5f0a3eb9a26940ab2a77580b5d139bc44e20d86c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129543
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2019-12-24 15:54:51 +00:00
Konstantin Shcheglov
8a0d30d4e2
Fix annotate-overrides in analyzer.
...
R=brianwilkerson@google.com
Change-Id: I7a587daf9715ded6450b28ecf3892ce4181aeb37
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129421
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-12-23 00:02:37 +00:00
Konstantin Shcheglov
9555c0a7d8
GenericInferrer gets all information from TypeSystem.
...
Change-Id: I1d3a5626a7ffda33ea7708b6d9f3b9a3b4f1a4f3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129308
Reviewed-by: Paul Berry <paulberry@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-12-20 20:25:04 +00:00
Konstantin Shcheglov
cf2a35f661
Use DartType.getDisplayString() in as many places as possible.
...
We fail to do this now in Element.toString(), which also should be
converted into something like getDisplayString(withNullability), so
that we used the appropriate presentation in DAS.
I noticed some duplication for type assertions in tests, and would
like to use more shared utilities for validating types.
Change-Id: I28af74a2c96916e868887df6422ccfb640a9c01b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129222
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-12-20 01:11:49 +00:00
Konstantin Shcheglov
8b204d477d
Remove StringUtilities.startsWithChar()
...
R=brianwilkerson@google.com
Change-Id: If05d2fcf0f60c3bd2b2319cf38cf463dcdc0e336
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128768
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-12-17 23:14:00 +00:00
Sam Rawlins
2d332ee1d3
Make private fields final where possible
...
Change-Id: I16ee52f1b23e8d708e40cb482c5150f1e04d2417
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128524
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-12-17 06:12:39 +00:00
Sam Rawlins
5dfa750393
Convert all function parameters and typedefs to generic syntax
...
Change-Id: I18f8644ecbe61555b2929ed09d446733d33ec2a3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128521
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2019-12-16 23:36:38 +00:00
Konstantin Shcheglov
99ba43c413
Look up concrete members when checking for PRIVATE_COLLISION_IN_MIXIN_APPLICATION.
...
Originally specified in https://github.com/dart-lang/sdk/issues/28809
There was a couple of holes in our unit tests, so we missed a
rare situation when the issue should not be reported.
R=brianwilkerson@google.com , paulberry@google.com
Change-Id: Iaf35a7755c4ac4fc69bd86c56f18dc0a952bf7fd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128523
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-12-16 00:36:36 +00:00
Paul Berry
09a0b040dd
Deprecate InterfaceType.lookupXyz, add new InheritanceManager based implementations.
...
With proposed changes to nullability suffixes and inheritance, we
better consolidate lookups in one place.
Change-Id: Id02fd9a470ea83e83af061b1d92fdbc90092a1a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127721
Commit-Queue: Paul Berry <paulberry@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2019-12-14 14:22:26 +00:00
Sam Rawlins
40718899fe
Fix pedantic 0.9 lints around collection literals and spreads
...
Change-Id: I64277c36fbeb4ea7a1bb429a8e0a40203520c883
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128380
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-12-14 00:15:41 +00:00
Konstantin Shcheglov
b3c2eb9f69
Stop setting AST properties for DDC.
...
Change-Id: Ia3fd639497b65844d386e06131dd729aa76c6a94
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128111
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-12-12 23:54:41 +00:00
Konstantin Shcheglov
e51702a7a1
Issue 39752. Fix for promoting TypeParameterType twice.
...
Bug: https://github.com/dart-lang/sdk/issues/39752
Change-Id: Idbb1a3b11d8eb6bdb05a2916d224a4d3e08a5b05
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128240
Reviewed-by: Paul Berry <paulberry@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-12-12 21:35:29 +00:00
Konstantin Shcheglov
3389b3bd32
Remove Packages from SourceFactory.
...
We have PackageMapUriResolver, this should be the way to resolve
all `package:xyz` URIs. We should not repeat it in SourceFactory.
Change-Id: I52d33dbf7e2d44f2c53521f6a51b0aea70507d3e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128106
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-12-12 17:10:00 +00:00
Konstantin Shcheglov
7e6c130ed6
Extract nullability TypeSystem tests.
...
R=brianwilkerson@google.com
Change-Id: I6dbfa4f92f83d7a595d979e614c33f62233df5be
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128012
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-12-11 16:53:49 +00:00
Sam Rawlins
c01b52cb0f
Remove duplicate 'DEFAULT_VALUE_IN_FUNCTION_TYPE_ALIAS' already reported by fasta
...
Fixes #39524
Change-Id: Iaf1c095a9f80809cb8b7e0edd966ab1b22c89abc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127544
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-12-11 16:22:48 +00:00
Sam Rawlins
bd008dd1e4
Allow empty URI strings in library directives
...
Fixes #38859
Change-Id: I1698b09bfee367634782f6f7c61f1dbda22edc0a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127600
Commit-Queue: Samuel Rawlins <srawlins@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2019-12-11 02:20:16 +00:00
Konstantin Shcheglov
e22ddd1372
Update TypeSystemTest to reuse more ElementsTypesMixin.
...
R=brianwilkerson@google.com , paulberry@google.com
Change-Id: I1ceb8a7fe429f194e7ff418105517b96917ce6df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127980
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-12-10 19:10:45 +00:00
Konstantin Shcheglov
9456316b51
ErrorReporter should know isNonNullableByDefault.
...
So, when we call DartType.getDisplayString() we know if the type
presentation should include nullability suffixes.
This fixes many, but not all places where we need to present types.
There are places where we don't go through ErrorReporter, but call
ErrorListener directly. I plan to replace all these with ErrorReporter.
R=brianwilkerson@google.com , paulberry@google.com
Bug: https://github.com/dart-lang/sdk/issues/39651
Change-Id: Ic77a556e7834d8f757c8b13eed37ed1d34f47348
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127744
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-12-10 01:31:22 +00:00
Sam Rawlins
9f2be5cadf
Move tests for 6 more diagnostic codes to the diagnostics/ directory
...
Change-Id: I291754287ff01baf86031960a3c4f260a9fc5df9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127541
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2019-12-07 17:31:45 +00:00
Konstantin Shcheglov
c17aff87e1
Restore skipping all dynamic type arguments in DartType.displayName
...
There is one internal client that currently depends on such presentation.
This will unblock rolling analyzer, then we will fix the client, and
remove this skipping code in analyzer.
R=brianwilkerson@google.com , paulberry@google.com
Change-Id: I0d6387892d12326d658800069dd8a60faa589405
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127488
Reviewed-by: Paul Berry <paulberry@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-12-07 02:24:34 +00:00
Sam Rawlins
3281a4ab7f
Move tests for 10 diagnostic codes to diagnostics/ files
...
Change-Id: Ic5e4f344c17b2c18c134b816a771fb61732dd934
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127452
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2019-12-06 16:00:10 +00:00
Konstantin Shcheglov
54b7543c55
Fix unnecessary_const in analyzer.
...
The only non-mechanical change is update for tool/diagnostics/generate.dart
to handle MethodInvocation, because without resolution and without
explicit `new` and `const` we get MethodInvocation(s).
R=brianwilkerson@google.com
Change-Id: Ib89ce9c37066e9b27ad03aed96b349ef36f11d43
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127453
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-12-06 15:03:00 +00:00
Konstantin Shcheglov
0bca6aaf10
Fix avoid_return_types_on_setters in analyzer.
...
R=brianwilkerson@google.com
Change-Id: If7132980451d76c777d3734abbb89ece5ad3e3d8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127425
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-12-06 01:48:48 +00:00
Konstantin Shcheglov
364dd8936b
Fix unnecessary_new in analyzer.
...
R=brianwilkerson@google.com
Change-Id: I70f80baa3da4b14c0a52c1f28da16a9ad26d7dda
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127424
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-12-06 01:11:30 +00:00
Konstantin Shcheglov
eee20b4e60
Fix prefer_equal_for_default_values in analyzer.
...
Change-Id: Ia72a2ac31d6cf6329c78baad6954ac9595a6c45a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127448
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-12-06 00:00:30 +00:00
Konstantin Shcheglov
f772b572c8
Fix curly_braces_in_flow_control_structures lint.
...
R=brianwilkerson@google.com , paulberry@google.com
Change-Id: I63cb372bf04f80182f873e2143971cb3cf1392fe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127447
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-12-05 23:46:13 +00:00
Konstantin Shcheglov
47383da053
Update LUB for Null vs star.
...
As specified in https://github.com/dart-lang/language/pull/700
Change-Id: I324841799a485600bf1ebfd54cd852465efac715
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/126981
Reviewed-by: Mike Fairhurst <mfairhurst@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-12-05 03:55:48 +00:00
Konstantin Shcheglov
48573044b3
Replace helper methods in AbstractTypeSystemTest with ElementsTypesMixin.
...
Change-Id: Ibb50a5ca9365212af6e1ed024d213cb06d6856da
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127062
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-12-04 00:37:18 +00:00
Brian Wilkerson
c6326de855
Improve the highlight region for variable_type_mismatch diagnostic
...
Change-Id: I8fd2b17c93f2247603a8caacce58cd4abcfb651d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/126760
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2019-11-30 16:09:50 +00:00
Brian Wilkerson
5b31b1e26d
Improve the selection range when reporting that an invoked constructor is not marked as const
...
Change-Id: Ibb49050394abe2ca1b7d5badf10227a970f15411
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/126701
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2019-11-29 16:09:06 +00:00
Konstantin Shcheglov
273ca5858b
Deprecate AnalysisContext.typeProvider/typeSystem
...
Change-Id: I5235aa38bcde93618a10b88da9ad6a8c3e5dc29c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/126141
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2019-11-25 22:00:47 +00:00
Konstantin Shcheglov
6294c73f3e
Deprecate 'typeSystem' parameter for InheritanceManager3.
...
Change-Id: If14eb8900b0fb5cac5e49cf865f2e6e3a0a0263d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/126083
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-11-22 23:08:41 +00:00
Kallen Tu
029e06b8d9
[analyzer] Allow downwards inference and upper bound heuristic wrt variance.
...
variance_downwards_inference_test now passes.
The other part of this CL addresses https://github.com/dart-lang/language/issues/658
The code has similar logic to https://dart-review.googlesource.com/c/sdk/+/125552 .
Change-Id: Ib2bc7e9c11574ccd9b16fe66472bba8c16dabd29
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125486
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Leaf Petersen <leafp@google.com >
Commit-Queue: Kallen Tu <kallentu@google.com >
2019-11-22 01:31:03 +00:00
Konstantin Shcheglov
28d272b3dd
Move more types access / creation helpers into ElementsTypesMixin.
...
R=brianwilkerson@google.com
Change-Id: Icbadc6c52fee636e851632dcd3b90818bf3264bb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125989
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-11-21 22:43:28 +00:00
Konstantin Shcheglov
f979bd9899
Merge RestrictedAnalysisContext into AnalysisContextImpl.
...
We don't have any useful / old API(s) in AnalysisContextImpl,
so the distinction between these two does not exist.
Change-Id: I87ef84bc728cc1c2c0e269c695419c425afb6559
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125987
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-11-21 21:58:16 +00:00
Konstantin Shcheglov
f3455278ff
Use 'isNonNullableByDefault' flag in TypeProviderImpl.
...
Instead of giving it the NullabilitySuffix, for consistency with
TypeSystemImpl.
R=brianwilkerson@google.com , paulberry@google.com
Change-Id: I16d1ca32071b8a28a31e207afed604f8d4b24a2e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125982
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-11-21 21:43:56 +00:00
Konstantin Shcheglov
6444fba9c7
Implement upper bound computation with NNBD rules.
...
https://github.com/dart-lang/language/blob/master/resources/type-system/upper-lower-bounds.md
Limitations:
1. Only UP is implemented, not DOWN.
So, handling formal parameters in incomplete.
2. Handling required named parameters is not implemented yet.
Change-Id: I4ddebeeaad21d41e0cbecfbc08aee82ec9752bce
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125761
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
2019-11-21 17:24:46 +00:00
Konstantin Shcheglov
b370346d60
Add 'isNonNullableByDefault' flag to TypeSystemImpl, make all parameters named required.
...
R=brianwilkerson@google.com
Change-Id: I262f86ba964f4970ec570dc9fa4c1a802556fa63
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125924
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
2019-11-21 15:37:46 +00:00