Commit Graph

9081 Commits

Author SHA1 Message Date
Konstantin Shcheglov a373aa7ce1 Convert GenericInferrer tests to non-nullable.
I.e. print types with nullabilities, and use 'none' types in tests.

R=brianwilkerson@google.com

Change-Id: Ia53885ebe7077b0de12e01ac5171711ca8b57e46
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142086
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-04-01 22:36:18 +00:00
Konstantin Shcheglov 3af491ecd8 Move additional tests and remove GreatestLowerBoundTest.
Change-Id: I463e4dacb5226d417e6ee13b53540c7c6b76cfc2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142065
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-04-01 21:38:48 +00:00
Konstantin Shcheglov 191be51124 Extract GenericInferrer and type schema.
Change-Id: Ic306342609911e3e232dbf95f30b60cff94c34be
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142062
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-04-01 20:54:48 +00:00
Konstantin Shcheglov 43115b0f75 Extract SubtypeHelper.
Change-Id: I6534e68e71108db2dbdca36897694179ec218cb4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141902
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-04-01 18:46:38 +00:00
Konstantin Shcheglov cf5620fa9e Use the deep-most packages.
Change-Id: I8c03e67d16a58f48e0ac334c216b21dcf2e532c0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141921
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-04-01 17:42:52 +00:00
Konstantin Shcheglov 0e5b596e0d Extract GreatestLowerBoundHelper and LeastUpperBoundHelper.
Change-Id: I1e10798d2dfe231ab5e6fb87a5eed42e81e43998
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141905
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-04-01 17:41:42 +00:00
Johnni Winther d68f552e70 [analyzer,cfe] Handle (un)assigned state in try-statement
This handles (un)assigned state in try-statement that do not
complete normally. In this case we could create a variable model
for an unreachable state that would be both assigned and unassigned
leading to an assertion failure.

Closes #41284

Change-Id: Id4c7689bc7c614338af3542eb342c964696fca1e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141981
Auto-Submit: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-04-01 15:46:15 +00:00
Konstantin Shcheglov 37773d39be Make 'covariant' parameter required in tryMatchSubtypeOf().
R=brianwilkerson@google.com, paulberry@google.com

Change-Id: I7a30e886c8fe2abdc5402d0d9da283cdd8f32c87
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141913
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-04-01 15:36:45 +00:00
Mike Fairhurst 5999b6bad5 Reland "[analyzer] Remove deprecated language version API"
This is a reland of 65a377b967

Original change's description:
> [analyzer] Remove deprecated language version API
> 
> Change-Id: I10122c8860b7b4c7dfcea1d6f8829ad6be439e7e
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141300
> Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
> Reviewed-by: Konstantin Shcheglov <scheglov@google.com>

Change-Id: I1c5180fcc40b14b4bcc209e0b6b9bc053814047d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141720
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Sigurd Meldgaard <sigurdm@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2020-03-31 18:41:50 +00:00
Konstantin Shcheglov e8c4aed700 Remove implementedForMixing from inheritance manager.
Change-Id: I4f698e1210d86e7c3d168e99b69aea0c075cc10e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141843
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-03-31 15:59:55 +00:00
Konstantin Shcheglov fb4b59e043 Deprecate isProxy / isOrInheritsProxy in ClassElement.
R=brianwilkerson@google.com, paulberry@google.com

Change-Id: Ied4011961d4dece33d527888d274893985d85f93
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141767
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-03-30 23:27:39 +00:00
Konstantin Shcheglov 9864a9532a Set dynamic resolution for super MethodInvocation in invalid context.
Every MethodInvocation should be resolved, even if to dynamic.
Leaving it undersolved caused NPEs later.

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

Change-Id: I43ad2889639684ecaecf3810127213f69765a271
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141703
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-03-30 23:25:49 +00:00
Konstantin Shcheglov 44b6f02985 Revert "Fix the result type of binary expression with the left TypeParameter extends num type."
This reverts commit 35ebf66c6a.

Reason for revert: This change is not supported by the specification.

Original change's description:
> Fix the result type of binary expression with the left TypeParameter extends num type.
> 
> R=​brianwilkerson@google.com, paulberry@google.com
> 
> Change-Id: I279093c6d155a667b42c47dcd8ca734b874dde57
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141473
> 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.

Change-Id: I84e90001d97f95dc729072d4dfa54a9bb53ab002
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141640
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-03-30 16:35:56 +00:00
Keerti Parthasarathy 1364488dce Add guard code for exceptions from ResourceProvider when reading contents.
Change-Id: I5deb050874c0f0c665777b365cfac59425fb1e76
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141440
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-03-30 02:32:54 +00:00
Konstantin Shcheglov 35ebf66c6a Fix the result type of binary expression with the left TypeParameter extends num type.
R=brianwilkerson@google.com, paulberry@google.com

Change-Id: I279093c6d155a667b42c47dcd8ca734b874dde57
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141473
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-03-29 04:09:23 +00:00
Brian Wilkerson 9d5fcfc7e7 Remove an unused variable in AstBuilder
Change-Id: I3497a21b78797abcebc03a59a44176a5fd78588b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141469
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-03-28 17:12:23 +00:00
Konstantin Shcheglov 1807cf2030 Add LibraryElement.languageVersionMajor/Minor
Change-Id: I33d2acb269381abf4f26aad0abe4e1feb2435931
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141464
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-03-28 17:01:08 +00:00
Konstantin Shcheglov 9ba1dc4e56 Report exceptions with the file content for getResult().
We report the exception to the caller via Future, but it is still
useful to report it into the exceptions stream with additional data.

R=brianwilkerson@google.com

Change-Id: I89bce59986b5df35072460e2bc36eaefc170fa98
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141468
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-03-28 16:53:25 +00:00
Konstantin Shcheglov ea9df6827e Fix crash in index when the invoked element is multiply defined.
Saw this in crash reports.

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

Change-Id: Ib2052c8d17abcd0194d75eae43f9f0df37d123db
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141522
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-03-28 16:53:03 +00:00
Alexander Markov a32dc76b86 Revert "[analyzer] Remove deprecated language version API"
This reverts commit 65a377b967.

Reason for revert: this change broke Flutter HHH and Flutter Golem build:

third_party/dart/third_party/pkg/pub/lib/src/validator/language_version.dart:57:40: Error: The getter 'languageVersion' isn't defined for the class 'CompilationUnit'.
 - 'CompilationUnit' is from 'package:analyzer/dart/ast/ast.dart'

Original change's description:
> [analyzer] Remove deprecated language version API
> 
> Change-Id: I10122c8860b7b4c7dfcea1d6f8829ad6be439e7e
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141300
> Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
> Reviewed-by: Konstantin Shcheglov <scheglov@google.com>

TBR=scheglov@google.com,mfairhurst@google.com

Change-Id: I979fa6201f03e1957bb2557d507b5090c303c82c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141521
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2020-03-28 00:35:21 +00:00
Mike Fairhurst 65a377b967 [analyzer] Remove deprecated language version API
Change-Id: I10122c8860b7b4c7dfcea1d6f8829ad6be439e7e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141300
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-03-27 18:54:47 +00:00
Mike Fairhurst 2753365946 Revert "[analyzer] Copy result of allSupertypes for now."
This reverts commit 8f492da139.

Reason for revert: ACX has been updated to not rely on this.

Original change's description:
> [analyzer] Copy result of allSupertypes for now.
> 
> Change-Id: I7713c439872734c94681fa1826e443a33fbec14f
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141030
> Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
> Commit-Queue: Mike Fairhurst <mfairhurst@google.com>

TBR=scheglov@google.com,mfairhurst@google.com

Change-Id: I59b24b1f7ece65975ca3a8c0016389d85cfafff7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141282
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2020-03-27 16:36:37 +00:00
Konstantin Shcheglov 8120ee57d2 Merge types during instance member inference.
Change-Id: If3f252d1c031fcb5219e485ac7a053186e6b950c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141207
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-03-27 16:22:26 +00:00
Konstantin Shcheglov 126ee948c8 Catch linking exceptions and include the cycle file contents.
I hope that this will help us to find and fix crashes that we see
during linking.

R=brianwilkerson@google.com

Change-Id: I2e269763395b68fa7bb1a4169b2d681a6834b8eb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141280
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-03-27 16:21:58 +00:00
Johnni Winther 25060e63c6 [cfe] Add tool for updating all id-tests and expectation tests
Change-Id: I191ebe0d59d44055a6818505db0112d3a452bdbb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141242
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2020-03-27 14:52:20 +00:00
Jens Johansen 4ab3bda5db [parser] Change recovery for constructor; report errors in bad constructors
Change-Id: I3d656afce4a3ec14c7c099893a434abba3945ebf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140862
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2020-03-27 11:57:56 +00:00
Konstantin Shcheglov 216d98ad2c Use NNBD_TOP_MERGE to combine signatures of the inherited members.
Initial: https://dart-review.googlesource.com/c/sdk/+/133041
Reverted: https://dart-review.googlesource.com/c/sdk/+/133086

Instance inference is not supported yet in this CL, will continue
in following CLs.

Change-Id: I72de01180b0624eeafc03bfe415ed3d928f1110f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133167
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-03-26 21:13:12 +00:00
Konstantin Shcheglov 1089356a21 Update checkForWrongTypeParameterVarianceInMethod(), fix NPE.
Saw in crash logs:

NoSuchMethodError: NoSuchMethodError: The getter 'type' was called on null.
Receiver: null
Tried calling: type
at Object.noSuchMethod	(dart:core )
at ErrorVerifier._checkForWrongTypeParameterVarianceInMethod	(error_verifier.dart:5002 )
at ErrorVerifier.visitMethodDeclaration	(error_verifier.dart:973 )
at MethodDeclarationImpl.accept	(ast.dart:6978 )
Change-Id: I17b3db0d537827e34c4cc63a9ebdf1ecbda455f3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141023
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-03-26 17:15:48 +00:00
Mike Fairhurst 8f492da139 [analyzer] Copy result of allSupertypes for now.
Change-Id: I7713c439872734c94681fa1826e443a33fbec14f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141030
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2020-03-26 17:15:09 +00:00
Konstantin Shcheglov 81a6ffae13 Add more data to debug crash in buildExportNamespace().
R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/41212
Change-Id: Iaf52b17cc39529362bd1932484a7fa69cdd95a7b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141080
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-03-26 17:07:46 +00:00
Konstantin Shcheglov fc91636703 Fix for crash when FieldFormalParameter in a local function has annotations.
Saw this in the crash reports.

R=brianwilkerson@google.com

Change-Id: I890592b264a3c33df80d89b45ad55ebe3fdf0c09
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141024
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-03-26 17:07:03 +00:00
Jens Johansen 137aeeb8a1 [analyzer] Sort entries in error.dart and syntactic_errors.dart
Change-Id: I1913b0dedc7a0100911c4cab3aeba5a30031bbbc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141120
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2020-03-26 14:03:18 +00:00
Mike Fairhurst 3095a082cd [analyzer] Add an API to get a language comment token off a unit.
Change-Id: I377fdc44d5e514d6d9a601b3947c3908e5a4497a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140768
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-03-26 03:47:57 +00:00
Konstantin Shcheglov 2dfb90618c Return null from getErrors() if the path does not own the URI.
b/152322246

R=brianwilkerson@google.com

Change-Id: I4cdd0b310dd183118e68c3bd97f6e136e44491a6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140881
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-03-25 16:07:16 +00:00
Konstantin Shcheglov 8e91510b16 Issue 41180. Test that analyzer infers correctly.
Bug: https://github.com/dart-lang/sdk/issues/41180
Change-Id: I177e0f5bad1522a98af987494ff02cad49b817e1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140820
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2020-03-25 16:00:12 +00:00
Konstantin Shcheglov b344a111dc Remove extra await null in analyzer.
R=brianwilkerson@google.com

Change-Id: Idcc04115f618ae7dfcb58a2ab93df538d2b65873
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140887
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-03-25 15:59:12 +00:00
Konstantin Shcheglov 70567aa8df Report an error when a null-aware index expression in legacy library.
Change-Id: I931445a748d88bf7a1416b880de3299b4a3e19bc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140774
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-03-24 20:55:47 +00:00
Konstantin Shcheglov a06325447d Use InheritanceManager3 directly in id_tests/inheritance_test
Change-Id: I2914b08f4c6b2b32f70001cd1445f5077e810a1d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140761
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-03-24 15:29:23 +00:00
Erik Ernst e3af7e724f Update usage of int/String fromEnvironment
Breaking change 40678 requires the constructors int.fromEnvironment and
String.fromEnvironment to get new default values for the named
parameter `defaultValue`. This CL changes usages of these constructors
such that they do not depend on the default value, such that it
becomes a non-breaking change for code in the SDK repo to perform the
change in sdk and in sdk_nnbd.

Change-Id: I82af0e1f92d6cd3618b65c0c50d754ae8c39eb0a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140284
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2020-03-24 11:19:14 +00:00
Konstantin Shcheglov 5e4f28b900 Use ClassHierarchy for computing implemented interfaces.
Change-Id: Ie7acf61f9a29d59cc1416dea85a6adb7c534b8c7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140703
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-03-23 22:00:37 +00:00
Konstantin Shcheglov 6b7d7aa2c1 Type Function should be excluded from extended / implemented / mixed types.
Change-Id: If225400a976657f042856bfdaf95b285f98cebb4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140660
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-03-23 20:35:37 +00:00
Konstantin Shcheglov e696554526 Add more libraries and classes to MockSdk.
https://critique-ng.corp.google.com/cl/301928602

Change-Id: I74353eee3b09ee0b03706a1fa274649a4bb04b81
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140563
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-03-23 16:10:43 +00:00
Konstantin Shcheglov 1dc03cc80c Fix for resolving MethodInvocation(s) with the synthetic method name.
I saw crashes because of this internally, mostly around ListLiteral
resolution (which were arguments of method invocations), and left
unresolved.

Change-Id: I814a7ac6cb4bfdffff701a8ed51b80849cedb82c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140483
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-03-22 21:19:39 +00:00
Konstantin Shcheglov bdf1454357 Consider FunctionType(s) with required named parameters as subtypes of legacy FunctionType(s) with named parameters.
Change-Id: Ic2f6b0226ec7885e45ef54053b95b84d3bbf8201
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140181
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-03-21 21:51:36 +00:00
Konstantin Shcheglov 3586f4ccde Issue 41130. Report an error for any default List constructor invocation.
Bug: https://github.com/dart-lang/sdk/issues/41130
Change-Id: Ib9f440773f7a2ac68b9bcba8a5b380541298434b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140363
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-03-21 18:39:16 +00:00
Konstantin Shcheglov 0100a5e7f9 Issue 41095. Update flatten() to null safety.
Bug: https://github.com/dart-lang/sdk/issues/41095
Change-Id: Id72bbe6f51657c474f70eca35677225ba40a5569
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140220
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-03-20 16:18:39 +00:00
Konstantin Shcheglov 532f43dcb2 Stop clearing evaluationResult for ConstVariableElement(s).
This was causing constant errors in _fe_analyzer_shared

With summary2, after https://dart-review.googlesource.com/c/sdk/+/109460
we infer types of fields and field formal parameters together, so
https://github.com/dart-lang/sdk/issues/35940 does not happen.

Change-Id: I3d8532fa938f4942d971d8f9055c8f0f50f482df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140001
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-03-19 23:04:19 +00:00
Konstantin Shcheglov 4844fa9622 Issue 40959. Support null-shorting for cascades.
Bug: https://github.com/dart-lang/sdk/issues/40959
Change-Id: Ia7fd153debafd13ab469bbfcc3a2d1ef3feaa5f5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139865
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-03-18 07:36:36 +00:00
Konstantin Shcheglov f4592159d6 Issue 41050. Support for evaluating bool.hasEnvironment().
Bug: https://github.com/dart-lang/sdk/issues/41050
Change-Id: I806c201dde6e4692a3252fef5aec2fbcbd663147
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139823
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-03-18 02:53:05 +00:00
Sam Rawlins 3fc075d397 Do not report on collision of private _static_ members
Fixes #29751; related to #27218

Change-Id: I8adcc5dcc7a97ec3e8237506af84aff2667aff6f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139866
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-03-18 01:05:25 +00:00