Commit Graph

7128 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 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 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
Sam Rawlins ba4f7f18cf Sort members in workspace tests
Change-Id: Ic9b6eb55d071c25b08e835b2768b41e7d57f101c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122491
Auto-Submit: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2019-10-23 04:32:47 +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
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
Nate Bosch 6c36630958 Update to latest package:yaml
Closes #38958

Tweak an analyzer test that fails after the update. There is a change in
package:yaml where map keys are now iterated in the order they are
defined in the file rather than an arbitrary order based on hash codes.

It is not clear to me whether this is safe or if it indicates a deeper
bug in the analyzer.

Change-Id: Ie02f1bc4277999f991583f9019e67ef70c33a895
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122029
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-10-18 20:40:48 +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
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
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
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
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
Jens Johansen 5c2b86897c [parser] late is a built-in identifier
Fixes #38803

Change-Id: I2fe7817aa0311c2370222a3205f1a1e02dc9aba4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121120
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-10-11 06:19:13 +00:00
Brian Wilkerson 5facc76ad9 Initial set of hints for ffi
This should cover the checks under "Subtyping restrictions" and
"Struct rules". The remaining checks will be in a follow-on CL.

Change-Id: Iaa328dad545e4f9cddd413c6039f7c15744db5b7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121146
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-10-10 22:27:24 +00:00
Konstantin Shcheglov 58c70b8e55 Store the actual static type of IntegerLiteral(s) in summary.
Fixes #35993
Fixes #33441

Change-Id: I369da4e4437db5ae31fb1c4eb7d3ab0657d9ceb5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/120520
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2019-10-10 20:03:28 +00:00
Konstantin Shcheglov a29bc5d5d3 Extend ResolvedAstPrinter to support more nodes.
R=brianwilkerson@google.com

Change-Id: I6b6a910d4a590a2017cd4673f203f5621690949b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121180
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-10-10 19:56:44 +00:00
pq 795949de00 fix loopVariable null access
See: https://github.com/dart-lang/linter/issues/1759

Addresses Object.noSuchMethod:

00:53 +313 -3: rule dart (config: nnbd) omit_local_variable_types [E]
  NoSuchMethodError: The getter 'declaredElement' was called on null.
  Receiver: null
  Tried calling: declaredElement
  #0      Object.noSuchMethod (dart:core-patch/object_patch.dart:51:5)
  #1      ResolverVisitor.visitForStatementInScope (package:analyzer/src/generated/resolver.dart:3993:30)
  #2      ScopedVisitor.visitForStatement (package:analyzer/src/generated/resolver.dart:5477:7)
  #3      ForStatementImpl.accept (package:analyzer/src/dart/ast/ast.dart:4772:49)
  #4      NodeListImpl.accept (package:analyzer/src/dart/ast/ast.dart:7682:20)
  #5      BlockImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:1115:17)
  #6      ResolverVisitor.visitNode (package:analyzer/src/generated/resolver.dart:4286:10)
  #7      UnifyingAstVisitor.visitBlock (package:analyzer/dart/ast/visitor.dart:3128:31)
  #8      ScopedVisitor.visitBlock (package:analyzer/src/generated/resolver.dart:5187:13)
  #9      BlockImpl.accept (package:analyzer/src/dart/ast/ast.dart:1111:49)
  #10     BlockFunctionBodyImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:1070:13)
  #11     ResolverVisitor.visitNode (package:analyzer/src/generated/resolver.dart:4286:10)
  #12     UnifyingAstVisitor.visitBlockFunctionBody (package:analyzer/dart/ast/visitor.dart:3131:55)
  #13     ScopedVisitor.visitBlockFunctionBody (package:analyzer/src/generated/resolver.dart:5198:13)
  #14     ResolverVisitor.visitBlockFunctionBody (package:analyzer/src/generated/resolver.dart:3522:13)
  #15     BlockFunctionBodyImpl.accept (package:analyzer/src/dart/ast/ast.dart:1066:49)
  #16     FunctionExpressionImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:5088:12)
  #17     ResolverVisitor.visitNode (package:analyzer/src/generated/resolver.dart:4286:10)
  #18     UnifyingAstVisitor.visitFunctionExpression (package:analyzer/dart/ast/visitor.dart:3263:57)
  #19     ScopedVisitor.visitFunctionExpression (package:analyzer/src/generated/resolver.dart:5524:13)
  #20     ResolverVisitor.visitFunctionExpression (package:analyzer/src/generated/resolver.dart:4050:13)
  #21     FunctionExpressionImpl.accept (package:analyzer/src/dart/ast/ast.dart:5082:49)
  #22     FunctionDeclarationImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:4941:26)
  #23     ResolverVisitor.visitNode (package:analyzer/src/generated/resolver.dart:4286:10)
  #24     UnifyingAstVisitor.visitFunctionDeclaration (package:analyzer/dart/ast/visitor.dart:3256:59)
  #25     ScopedVisitor.visitFunctionDeclarationInScope (package:analyzer/src/generated/resolver.dart:5517:11)
  #26     ResolverVisitor.visitFunctionDeclarationInScope (package:analyzer/src/generated/resolver.dart:4025:11)
  #27     ScopedVisitor.visitFunctionDeclaration (package:analyzer/src/generated/resolver.dart:5510:7)
  #28     ResolverVisitor.visitFunctionDeclaration (package:analyzer/src/generated/resolver.dart:4016:13)
  #29     FunctionDeclarationImpl.accept (package:analyzer/src/dart/ast/ast.dart:4934:49)
  #30     ResolverVisitor.visitCompilationUnit (package:analyzer/src/generated/resolver.dart:3608:23)
  #31     CompilationUnitImpl.accept (package:analyzer/src/dart/ast/ast.dart:2140:49)
  #32     LibraryAnalyzer._resolveFile (package:analyzer/src/dart/analysis/library_analyzer.dart:680:10)
  #33     LibraryAnalyzer.analyzeSync.<anonymous closure> (package:analyzer/src/dart/analysis/library_analyzer.dart:151:7)
  #34     _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:377:8)
  #35     LibraryAnalyzer.analyzeSync (package:analyzer/src/dart/analysis/library_analyzer.dart:150:11)
  #36     LibraryAnalyzer.analyze.<anonymous closure> (package:analyzer/src/dart/analysis/library_analyzer.dart:113:14)
  #37     _PerformanceTagImpl.makeCurrentWhile (package:analyzer/src/generated/utilities_general.dart:258:15)
  #38     LibraryAnalyzer.analyze (package:analyzer/src/dart/analysis/library_analyzer.dart:112:43)
  #39     AnalysisDriver._computeAnalysisResult.<anonymous closure> (package:analyzer/src/dart/analysis/driver.dart:1261:63)
  #40     PerformanceLog.run (package:analyzer/src/dart/analysis/performance_logger.dart:34:15)
  #41     AnalysisDriver._computeAnalysisResult (package:analyzer/src/dart/analysis/driver.dart:1237:20)
  #42     AnalysisDriver.getErrors (package:analyzer/src/dart/analysis/driver.dart:548:41)
  <asynchronous suspension>
  #43     LintDriver.analyze (package:analyzer/src/lint/analysis.dart:220:32)
  <asynchronous suspension>
  #44     DartLinter.lintFiles (package:analyzer/src/lint/linter.dart:87:36)
  <asynchronous suspension>
  #45     testRule.<anonymous closure> (file:///Users/pquitslund/src/repos/linter/test/rule_test.dart:262:54)
  <asynchronous suspension>
  #46     Declarer.test.<anonymous closure>.<anonymous closure>.<anonymous closure> (package:test_api/src/backend/declarer.dart:168:27)
  <asynchronous suspension>
  #47     Invoker.waitForOutstandingCallbacks.<anonymous closure> (package:test_api/src/backend/invoker.dart:242:15)
  <asynchronous suspension>
  #48     _rootRun (dart:async/zone.dart:1124:13)
  #49     _CustomZone.run (dart:async/zone.dart:1021:19)
  #50     _runZoned (dart:async/zone.dart:1516:10)
  #51     runZoned (dart:async/zone.dart:1463:12)
  #52     Invoker.waitForOutstandingCallbacks (package:test_api/src/backend/invoker.dart:239:5)
  #53     Declarer.test.<anonymous closure>.<anonymous closure> (package:test_api/src/backend/declarer.dart:166:33)
  #54     _rootRun (dart:async/zone.dart:1124:13)
  #55     _CustomZone.run (dart:async/zone.dart:1021:19)
  #56     _runZoned (dart:async/zone.dart:1516:10)
  #57     runZoned (dart:async/zone.dart:1463:12)
  #58     Declarer.test.<anonymous closure> (package:test_api/src/backend/declarer.dart:165:13)
  <asynchronous suspension>
  #59     Invoker._onRun.<anonymous closure>.<anonymous closure>.<anonymous closure>.<anonymous closure> (package:test_api/src/backend/invoker.dart:392:25)
  <asynchronous suspension>
  #60     new Future.<anonymous closure> (dart:async/future.dart:176:37)
  #61     StackZoneSpecification._run (package:stack_trace/src/stack_zone_specification.dart:209:15)
  #62     StackZoneSpecification._registerCallback.<anonymous closure> (package:stack_trace/src/stack_zone_specification.dart:119:48)
  #63     _rootRun (dart:async/zone.dart:1120:38)
  #64     _CustomZone.run (dart:async/zone.dart:1021:19)
  #65     _CustomZone.runGuarded (dart:async/zone.dart:923:7)
  #66     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:963:23)
  #67     StackZoneSpecification._run (package:stack_trace/src/stack_zone_specification.dart:209:15)
  #68     StackZoneSpecification._registerCallback.<anonymous closure> (package:stack_trace/src/stack_zone_specification.dart:119:48)
  #69     _rootRun (dart:async/zone.dart:1124:13)
  #70     _CustomZone.run (dart:async/zone.dart:1021:19)
  #71     _CustomZone.bindCallback.<anonymous closure> (dart:async/zone.dart:947:23)
  #72     Timer._createTimer.<anonymous closure> (dart:async-patch/timer_patch.dart:21:15)
  #73     _Timer._runTimers (dart:isolate-patch/timer_impl.dart:382:19)
  #74     _Timer._handleMessage (dart:isolate-patch/timer_impl.dart:416:5)
  #75     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:172:12)




Change-Id: I15b2298f88ee986475736807ef8fd15133e18472
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/120928
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2019-10-09 23:02:40 +00:00
Konstantin Shcheglov f9e7761895 Stop using lazy FunctionType where possible.
We have to keep it for now for GenericFunctionType nodes, because
of the way we build types - we first build elements, for example
GenericFunctionTypeElement, and set the type of the GenericFunctionType
nodes to a lazy FunctionType on top of not-yet-resolved element.
Then on the next step TypeResolverVisitor goes over the AST second
time and updates elements with actual types for TypeName(s).

There is no need for doing this now when we are using summary2, it
has its own way to solve forward references with creating elements for
unresolved AST nodes, and breaking cycles with TypeBuilder(s). But the
current implementation is quite big, and it will take some time for me
to try one or another approach to restructure it.

Change-Id: Ic0b8594a6723f715bc5484f9946324c46e30ffb2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/120620
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-10-08 15:25:51 +00:00
Konstantin Shcheglov 3260bb29e0 Remove references to ElementHandle in analyzer and DDC.
Change-Id: I890d263552d3d08a00ff6f9fdf7291a03e8760db
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/120630
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-10-08 15:25:14 +00:00
Jens Johansen 8f477fd84a [parser] Disallow covariant on extension method parameters
Fixes #38560.

Change-Id: I4c941fb6713983cc01efbe143c7924d0643efe73
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119332
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-10-08 13:01:40 +00:00
Konstantin Shcheglov a389015083 Rewrite MethodInvocation to FunctionExpressionInvocation when the target is not a method.
Failing tests for DDC are tracked in the following issue:
https://github.com/dart-lang/sdk/issues/38749

Change-Id: I96e0fe9bc87509b99ba982be4572d4ad4f133cca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/120342
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-10-08 00:22:39 +00:00
Paul Berry f918214f36 Add a unit test reproducing issue #38352.
Change-Id: I0a7046ebc7d4e21458707af5aafd0382899a83d3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119530
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-10-07 17:54:06 +00:00
Konstantin Shcheglov ad47b1ca64 Remove summary1, part 2.
Change-Id: I050b62bbbd77db6bd6a2d815e70cfe92cc9432a2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119220
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2019-10-07 17:35:55 +00:00
Konstantin Shcheglov 0881a4a691 Reland "Deprecate TypeParameterTypeImpl.getTypes()"
This is a reland of aa0bd58926

Original change's description:
> Deprecate TypeParameterTypeImpl.getTypes()
> 
> Presubmit in google3 looks green.
> https://test.corp.google.com/ui#id=OCL:272795904:BASE:272795986:1570167013170:de765f48
> 
> Change-Id: I9ef25658a8a8e806b7fcc23b8d9d4e1d297ebff8
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/120003
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
> Commit-Queue: Konstantin Shcheglov <scheglov@google.com>

Change-Id: Idbe4fb391711f2f3a03fe9fb32c136af71a7ef04
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/120421
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-10-07 17:28:45 +00:00
Sam Rawlins ebc0a88154 Error for assert initializer in redirecting constructor; fixes #37867
Bug: https://github.com/dart-lang/sdk/issues/37867
Change-Id: I74a809f2202e7ea1beeb45a8ce5d62613f102045
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/120100
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-10-07 05:33:35 +00:00
Konstantin Shcheglov 2c674e9ba9 Consider MultiplyDefinedElement as null for summary serialization.
Bug: https://buganizer.corp.google.com/issues/142145283
Change-Id: I4de873d322236d97fb942dbb0ae3f4fc22a0687e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/120440
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-10-05 16:02:24 +00:00
Brian Wilkerson 04910d62f5 Include the deprecation message in diagnostics (issue 38667)
Change-Id: Ib1fa24fa4b112b9675d1f1900cbdda15319080a5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119780
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-10-04 16:27:07 +00:00
Konstantin Shcheglov 3cdfd90481 Revert "Deprecate TypeParameterTypeImpl.getTypes()"
This reverts commit aa0bd58926.

Reason for revert: https://dart-review.googlesource.com/c/sdk/+/119587 was reverted. So, this change now breaks bots because of deprecated
getTypes() usage in DDC.

Original change's description:
> Deprecate TypeParameterTypeImpl.getTypes()
> 
> Presubmit in google3 looks green.
> https://test.corp.google.com/ui#id=OCL:272795904:BASE:272795986:1570167013170:de765f48
> 
> Change-Id: I9ef25658a8a8e806b7fcc23b8d9d4e1d297ebff8
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/120003
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
> Commit-Queue: Konstantin Shcheglov <scheglov@google.com>

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

Change-Id: I3dc1a700f496c25eea9898de658a31138bbedcce
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/120141
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-10-04 16:04:07 +00:00
Konstantin Shcheglov aa0bd58926 Deprecate TypeParameterTypeImpl.getTypes()
Presubmit in google3 looks green.
https://test.corp.google.com/ui#id=OCL:272795904:BASE:272795986:1570167013170:de765f48

Change-Id: I9ef25658a8a8e806b7fcc23b8d9d4e1d297ebff8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/120003
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-10-04 14:32:25 +00:00
Konstantin Shcheglov 0cd0d9a744 Remove FunctionTypeImpl.forTypedef()
Change-Id: I4d54ef8046a8dd5b06b9f815e89d28e5a8a985d5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119823
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-10-03 16:25:33 +00:00
Brian Wilkerson 4b0ba9cf84 Fix bug when operating on a tearoff from an extension override (issue 38653)
Change-Id: I809f57d6558f59f1563e9efa7582c69d0c14ea48
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119700
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-10-02 18:16:00 +00:00
Brian Wilkerson 33cd343374 Clean up the stack when a constructor initializer is found (issue 38674)
Change-Id: I219586288a8588298cef94f80be8030581907556
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119680
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-10-02 17:11:40 +00:00
Mike Fairhurst 2590d065f1 Update test_reflective_loader, use @SkippedTest
Change-Id: I17f8da88a4587a7ad51038ca796f138231021fe9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119583
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-10-02 00:02:21 +00:00