Commit Graph

8489 Commits

Author SHA1 Message Date
Sam Rawlins 361af0d69a Fix BazelWorkspace.find and .findPackage for distributed environment.
Bug: b/127705208
Change-Id: I82d2a9986163ea8ca6ae24f82af2d138cf3bdd25
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122590
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-10-23 21:17:57 +00:00
Paul Berry 92c69f224b Flow analysis: promote on successful execution of an "as" expression.
Change-Id: I506281ab2dfe23b4b75daf795028fec979006932
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122586
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-10-23 17:02:37 +00:00
Paul Berry 6461e412b6 Flow analysis: call initialize for params after functionExpression_begin.
The order doesn't actually affect the outcome, but it's more
consistent to mark the closure's parameters as initialized after the
call to functionExpression_begin, because that means that the
initialization happens while they are in scope, similar to what
happens for local variables.

Change-Id: I6404c0d907ddb14f4265948d453dcbff33f60284
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122585
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-10-23 15:50:10 +00:00
Paul Berry 5837c65b6e Flow analysis: test unreachability for constructor initializers.
This was already working, it just needed some updates to the test
infrastructure so we could test it properly.

Change-Id: Ie838fb50cf90aabd19c6e0c637df546ddcda16d7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122584
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-10-23 15:50:10 +00:00
Paul Berry 8e23f76ac7 Flow analysis: properly handle promotion of type parameters.
When promoting a type parameter, we need to create an intersection
type (e.g. "T & int").  Such a type is represented in the analyzer and
the front end as a type parameter type pointing to the same type
variable, but with a different bound.

Change-Id: I1655f9242d913ca958c279cc80c3f6329f6b396d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122581
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-10-23 15:50:10 +00:00
Paul Berry a7b092edf0 Fix operator== for type parameter types.
Previously we were only checking that they referred to the same type
parameter, which meant that promoted type parameter types compared
equal to their unpromoted counterparts.

Change-Id: Id5f372d006dc9fffa0e5866b3e4eb54e31978450
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122600
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-10-23 15:50:10 +00:00
Paul Berry 06a8577de2 Flow analysis: recursively annotate unreachable nodes in test
Previously, in the flow analysis reachability tests, we only annotated
a node as unreachable if it wasn't "covered" by a parent node that was
already marked as unreachable.  This made the tests more compact, but
it meant that the testing was less complete, because it meant that we
weren't verifying that the nodes inside of unreachable nodes were also
unreachable.

This CL changes the tests so that we mark every unreachable node as
unreachable, with one small exception: for an expression statement, we
don't mark the expression; we just mark the statement as unreachable,
and we have an assertion in the data extractor to verify that the
expression's reachability matches that of the statement.

Change-Id: I92454c72e9704b34e2dbafb9f5f19a8ee31f8f15
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122583
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-10-23 15:50:10 +00:00
Paul Berry 0887806796 Flow analysis: introduce TypeOperations.tryPromoteToType method.
Previously, any attempt to promote type A to type B produced type B if
B was a subtype of A, and failed otherwise.  But in order to support
promotion of type parameters, we need the ability to produce a fresh
"intersection type" (e.g. `T & int`).  The new
`TypeOperations.tryPromoteToType method` makes this possible by giving
the client the opportunity to synthesize the new type when necessary.

Change-Id: If671d5d865f38469a878329180c3a1c94e25a42c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122582
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-10-23 11:12:21 +00:00
Paul Berry dfddeada02 Flow analysis: treat expressions of type Never as unreachable.
Change-Id: I4e6c629e4f9f8ebba3c7b2168b421a723c69928b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122417
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-10-23 05:52:26 +00:00
Paul Berry 4ab09db0f4 Analyzer flow analysis for null-aware operators.
The front end implementation is in a previous CL
(https://dart-review.googlesource.com/c/sdk/+/122415).  This CL
contains the analyzer implementation and the integration tests.

Note that the analyzer implementation of null shorting is incomplete,
so some corner cases couldn't be tested.  I'll be fixing this in
follow-up CLs.

Change-Id: I0935ee4c67b24f8bf7c70cbb7ec56dd826fbf73a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122416
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-10-22 19:18:16 +00:00
Paul Berry aeede3c1b0 Flow analysis: pass catch variables to tryCatchStatement_catchBegin.
Previously, it was the caller's responsibility to call initialize()
for any variables declared in a catch block.  Now this is done
automatically.

Change-Id: If9c586e12f7d114517476e56e984d16a570648e6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122413
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-10-22 10:56:54 +00:00
Paul Berry 9579c4bc3c Flow analysis: simplify use of isExpression_end.
Previously, it was the caller's responsibility to determine if the
subexpression of an "is" expression was a read of a promotable
variable.  Now, the caller calls isExpression_end regardless of what
the subexpression is, and flow analysis determines whether promotion
should happen or not.

Change-Id: Ibba689935580d4e9c5ab79e5afb534c173386232
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122411
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-10-22 10:56:54 +00:00
Konstantin Shcheglov d0e35833b3 Remove UnitExplicitTopLevelAccessors, UnitExplicitTopLevelVariables.
Change-Id: Ic7273cca19e98f47b7ef4a3cf62ded9b0a51bed1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122305
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-10-22 05:46:13 +00:00
Konstantin Shcheglov 159e0b74bc Remove SourceContainer, Source_ContentReceiver.
Change-Id: I6e801382605d412f1f24d09ee58009c249439d46
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122300
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2019-10-22 05:28:28 +00:00
Konstantin Shcheglov e85c98b1f9 Remove BuildLibraryElementUtils.
It was used by task model, so is not used anymore.

Change-Id: Ic0031adc8d1784d4e881489318d2a9efe954b9da
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122282
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-10-22 05:22:08 +00:00
Konstantin Shcheglov 4ce76d4d46 Remove AnalysisCache, CachePartition, SdkCachePartition.
Change-Id: I8d6291f5292638571ae7dbf848f15acb2a9af8bb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122283
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-10-22 05:20:23 +00:00
Konstantin Shcheglov 7d474c95bb Remove fixed GENERIC_FUNCTION_TYPED_PARAM_UNSUPPORTED.
Change-Id: Id5119149cf24fe748a3100b3a2b774915928ddf7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122303
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-10-22 05:14:03 +00:00
Konstantin Shcheglov c3cd6b0c6e Remove VariableGatherer and related.
Change-Id: I4c2982e14f09c4876765cc70fc47c0261eaf24b2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122304
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-10-22 05:06:03 +00:00
Konstantin Shcheglov de63b83b5b Remove TypeParameterSerializationContext.
Change-Id: I491eb58ebac00cddb3112bcfafa51d39cda1788e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122302
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-10-22 04:51:45 +00:00
Konstantin Shcheglov bf9cef0ab9 Remove two unused methods in ElementImpl.
Change-Id: I5c023b8d4dc1261df5b2e58d13fe08508cf27a50
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122301
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-10-22 04:47:43 +00:00
Sam Rawlins 66ceec0e3d Fix redirecting constructor const check
Fixes #27617

Change-Id: Id8629354e844d3f265302eda6348afccc2d63be1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122120
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-10-21 21:22:18 +00:00
Paul Berry 5d4cd6d589 Breaking changes for analyzer version 0.39.
Change-Id: Ifa9ca24487f93f3eb0ec95eeb64f5bbb5aa32714
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113216
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-10-21 18:23:10 +00:00
Daco Harkes 8b3d76dff1 [analyzer/ffi] Fix crash with dynamic field in struct
Closes: https://github.com/dart-lang/sdk/issues/38993

Change-Id: I6aaa265020709d5846a40bd8fb1c7bd1ef38903c
Cq-Include-Trybots: luci.dart.try:vm-ffi-android-debug-arm-try,vm-ffi-android-debug-arm64-try,dart-sdk-linux-try,analyzer-analysis-server-linux-try,analyzer-linux-release-try,front-end-linux-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122341
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-10-21 11:05:20 +00:00
Sam Rawlins d9fa27a9ed Update ~48 doc comments to have one-sentence summaries
From Effective Dart: Documentation:
* https://www.dartlang.org/guides/language/effective-dart/documentation#do-start-doc-comments-with-a-single-sentence-summary
* https://www.dartlang.org/guides/language/effective-dart/documentation#do-separate-the-first-sentence-of-a-doc-comment-into-its-own-paragraph

Change-Id: Ie49b2e6a2cad5c1d01a6cd625f91f89e4fcc39ce
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/69260
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-10-17 21:48:46 +00:00
Paul Berry 7d4bc6a1df Fix handling of null awareness in cascade expressions.
Change-Id: Id8f9f45d04bac135c516e543542991c4cb4a0c16
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121909
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-10-17 16:09:30 +00:00
Konstantin Shcheglov ee64f31aba Issue 38911. When no actual dependencies, exclude context and SDK files from dependencies.
Bug: https://github.com/dart-lang/sdk/issues/38911
Change-Id: I0d1091cea2845d4967800d1430c014544ed420c2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121908
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-10-17 14:32:30 +00:00
Martin Kustermann 30719b37a9 [analyzer/ffi] Allow "Pointer<NativeType>" in native function signatures
Issue b/142788837

Change-Id: If3a25bf67525f3fa5bc964df291ed4461e0da53c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121854
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2019-10-17 10:42:54 +00:00
Konstantin Shcheglov 1b044eec08 Combine nullabilities during substitution.
Bug: https://github.com/dart-lang/sdk/issues/38900
Change-Id: I1bccb87ba863f3c075eacbf6cca499a12d4cb3b8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121921
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-10-17 02:47:31 +00:00
Konstantin Shcheglov c2489c2f53 Issue 38811. Fix for reporting MISSING_DEFAULT_VALUE_FOR_PARAMETER for FutureOr.
Bug: https://github.com/dart-lang/sdk/issues/38811
Change-Id: I4027061f15ed8e88d773ec6b5cbbf3f495829095
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121922
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-10-17 02:40:31 +00:00
Konstantin Shcheglov 9fe78bc9a8 Support for 'question' in FieldFormalParameter.
So, with 'question' token in AST, we can finish fixing the issue.

Bug: https://github.com/dart-lang/sdk/issues/38811
Change-Id: I9997be57c891c99c85dbfe3ef85871043fd3bffe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121884
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2019-10-16 23:04:56 +00:00
Konstantin Shcheglov 0649cb7755 Issue 38900. Fix type parameter type NonNull promotion.
Bug: https://github.com/dart-lang/sdk/issues/38900
Change-Id: If4373ebe6a35c83d07e8ebbac13bd0e00761f806
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121881
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-10-16 21:21:45 +00:00
Konstantin Shcheglov 41bc899b56 Check for implicit cast using computeVariance().
This drops the optimization for Never.

Change-Id: I2f77e385559d8e1c278711f225a6d7e643577e9b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121764
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-10-16 21:15:31 +00:00
Martin Kustermann 9634e053cb [analyzer/ffi] Remove Struct type parameter in analyzer mock SDK
Change-Id: Ifb178f3128082629ade5d7bf9b1b23736b8dfc98
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121840
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2019-10-16 10:27:41 +00:00
Konstantin Shcheglov e221f83feb Set nullability for function typed formal parameters.
This covers the issue, but function typed field formal parameters
are still to be supported.

Bug: https://github.com/dart-lang/sdk/issues/38811
Change-Id: Ibcee1b5a76aee4d80f9bb6085a918955cf9fb05e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121801
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-10-15 23:23:12 +00:00
Martin Kustermann 65813f5856 [analyzer/ffi] Extends dart:ffi specific analyzer checks
This makes all tests in the ffi test suite pass:

   % tools/test.py -cdart2analyzer -mrelease -ax64 ffi

Issue https://github.com/dart-lang/sdk/issues/35777

Change-Id: I93338ee530041e5e8cb1eb5958b12fbf1517496e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121711
Auto-Submit: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-10-15 21:33:27 +00:00
Sam Rawlins 3778839976 Fix version number that first supports ui-as-code; fixes #37898
Change-Id: Iaaec4dedbe8f9b2b5331fa9c69c39d5032383d75
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113743
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2019-10-15 19:35:49 +00:00
Daco Harkes d82ca1a9c7 [vm/ffi] Remove Struct type argument
This has coupled changes in package:ffi and package:tflite_native which are pinned in DEPS.

This CL includes the required analyzer changes from https://dart-review.googlesource.com/c/sdk/+/121647.

Issue: https://github.com/dart-lang/sdk/issues/38611

Change-Id: I712a886fd28ce0a2954fc42c90e1dfa495057732
Cq-Include-Trybots: luci.dart.try:vm-ffi-android-debug-arm-try,vm-ffi-android-debug-arm64-try,app-kernel-linux-debug-x64-try,vm-kernel-linux-debug-ia32-try,vm-dartkb-linux-debug-simarm64-try,vm-kernel-win-debug-x64-try,vm-kernel-win-debug-ia32-try,vm-dartkb-linux-debug-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-dartkb-linux-release-x64-abi-try,vm-kernel-precomp-android-release-arm64-try,vm-kernel-asan-linux-release-x64-try,vm-kernel-linux-release-simarm-try,vm-kernel-linux-release-simarm64-try,vm-kernel-precomp-android-release-arm_x64-try,vm-kernel-reload-mac-release-simdbc64-try,vm-kernel-precomp-obfuscate-linux-release-x64-try,vm-kernel-reload-rollback-linux-debug-x64-try,vm-kernel-precomp-mac-release-simarm_x64-try,dart-sdk-linux-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121422
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-10-15 18:35:57 +00:00
Konstantin Shcheglov abecefd1ac Forward compatible portion of CL that does not set types for identifiers that are not expressions.
The full CL:
https://dart-review.googlesource.com/c/sdk/+/119761

Change-Id: I9c909a4e1eec5d05f5718849ea45da79f01c5291
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121643
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-10-15 17:29:07 +00:00
Konstantin Shcheglov 15fe929bbb Don't use LocalElementBuilder in top-level inference.
Change-Id: Ia390441fae26ac53abcd4fff65e8244f727e152d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121648
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-10-14 22:15:57 +00:00
Paul Berry c9c8e4d84f Resolver fix: set auxiliaryElements properly for property accesses.
Previously we only set it for index expressions, prefixed identifiers,
and simple identifiers.

Change-Id: Ib666aa936f0e7bf7421cb74e491d35ab5507d412
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121520
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-10-14 19:44:10 +00:00
Konstantin Shcheglov 10ad0c3830 Don't use '.type' in FindElement.
R=brianwilkerson@google.com

Change-Id: I8c73bea747f1ad771351f06cd7bea41b2ade6e8c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121661
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-10-14 19:03:48 +00:00
Brian Wilkerson af671211ab Add more ffi related checks
There are still two checks that I'm aware of that are not being performed
(there are TODOs for them) and two diagnostics that need to be removed
because `Struct` will soon not take a type argument.

Change-Id: I17424a32225eeff7e3b2c0e0f36cfc6ccd45e0a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121640
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-10-14 18:36:25 +00:00
Konstantin Shcheglov dc0db066e6 Remove ChangeSet from engine.dart
Change-Id: I289c5edd0c3e52a873013f8c52d8202bf29cf3be
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121560
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-10-14 17:45:56 +00:00
Konstantin Shcheglov aeacf565ab Check for missing required arguments using parameter elements.
Bug: https://buganizer.corp.google.com/issues/140314870
Change-Id: I42a615fbd17af2b3d3b424f847a4b75463415377
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121540
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-10-14 17:40:36 +00:00
Konstantin Shcheglov 6ad5c2e0b9 Combine elements building with TypeName(s) resolution.
This CL passes presubmit in google3.
https://test.corp.google.com/ui#id=OCL:273879967:BASE:274371532:1570918058929:7943e848

Change-Id: Icea75f6544dcdb01602ff3ef1a899bb59729c6a8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/120820
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-10-14 16:57:51 +00:00
Paul Berry 61790a17b6 Flow analysis: add support for non-null assertion operator.
Change-Id: I7a60944a4389b6f7c8e182d5c9b402fcbb05b624
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121100
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-10-12 03:11:03 +00:00
Paul Berry 4e9220efdb Flow analysis: change the way parenthesized expressions are handled.
Instead of forcing the client to provide a way to de-parenthesize an
expression, the client informs flow analysis when a parenthesized
expression is encountered.  This reduces the runtime overhead to zero
for non-parenthesized expressions, and it saves the front end from
having to worry about support for parenthesized expressions (since its
internal representation doesn't care about parentheses).

Change-Id: I0bb6e91c87acaa05591e1b075da18700b11e4aae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121080
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
2019-10-12 03:11:03 +00:00
Kallen Tu ff8c704e9b Clean up handleVarianceModifier error handling and move to endTypeVariable.
Change-Id: I526e41511f57b48010d52dbcb7f7d7feb79600da
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/120932
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2019-10-11 18:39:28 +00:00
Brian Wilkerson a2e00066ff Add an error if a field in a struct class does not have a type annotation
Change-Id: Ie38354045f0b5d1d8a335c6bb2d14689c2b49d6d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121460
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-10-11 18:11:58 +00:00
Brian Wilkerson 3f80de6dc5 Generate errors rather than hints for ffi conformance checks
Change-Id: Icb3a3b393200ae7b2cd0d0b603472e90174c970b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121403
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-10-11 17:18:09 +00:00