Commit Graph

10502 Commits

Author SHA1 Message Date
Konstantin Shcheglov 396b5fb7a9 Report issues with loading summaries using LibraryCycleLinkException.
...so that we can include additional data as a "file".
The exception text has smaller size limit than we need.

Change-Id: I56ff7f7a85658419aa360bd6ab48b55fd180bfe5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148794
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-05-21 16:40:01 +00:00
Konstantin Shcheglov d24a834181 Subtype constraint generation.
Implements part of https://github.com/dart-lang/language/pull/957

Change-Id: Ia9174c6be6710ae43619f7b5c07d8feb190ca6a7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148225
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-05-21 00:38:24 +00:00
Konstantin Shcheglov c93537c50f Use FindNode and FindElement in search tests.
Change-Id: I29d7ad856e050b09337817df02610aebb6f40303
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148790
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-05-21 00:29:10 +00:00
Konstantin Shcheglov dbc41af864 Extract ElementNameComponents and use in indexing, tests, and search.
Change-Id: Ib84f5d593bffc8a4e7587d1bded22459bf234e74
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148785
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-05-20 22:46:54 +00:00
Konstantin Shcheglov e6bdfb70c5 Fix analyzer tests of Windows.
TBR

Change-Id: I92921d41a711c19ff846a649193252effe0a310b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148787
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-05-20 22:44:14 +00:00
Konstantin Shcheglov 819e82ee1d Fix subtype 'T <: Object' when T has implicit Object? bound.
We were not reporting a compile-time error by a wrong reason.
https://github.com/dart-lang/sdk/issues/40089

Change-Id: Ic0caf01a49e5dc4badefb5a534a7dbaac2108213
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148743
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-05-20 21:45:24 +00:00
Konstantin Shcheglov 10e14c0377 Add context information to exceptions during computing fixes.
R=brianwilkerson@google.com, devoncarew@google.com

Change-Id: Idfd6aaa1f593cef496ebf0763ff038c1ddae6d80
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148783
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-05-20 20:44:11 +00:00
Konstantin Shcheglov 2231b8c580 Use AllowedExperiments in analyzer.
Bug: https://github.com/dart-lang/sdk/issues/41741
Change-Id: Iba0face7198f4ecc17c86d2fcb0630912db7ba60
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148648
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-05-20 20:42:31 +00:00
Konstantin Shcheglov 1821f0ec32 Issue 41997. Fix for indexing, searching, renaming members of unnamed extensions.
Bug: https://github.com/dart-lang/sdk/issues/41997
Change-Id: I963a9ceae03a0d1ed3d04936c4042980a08fa56f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148780
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-05-20 18:12:30 +00:00
Konstantin Shcheglov 5dd096ac99 Fix NPE in PropertyAccessorMember.correspondingGetter/Setter.
Change-Id: I9b1dc720b39c5c58b3da6e27543264362f4d2eba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148681
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-05-20 06:43:11 +00:00
Konstantin Shcheglov daa8d68a29 Handle the case when source cannot be found for uri
Change-Id: Ia34d6162f59fa83ae9ed8f6e841088e5b779065a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148236
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2020-05-19 22:35:11 +00:00
Konstantin Shcheglov df695b84d1 Rename element model modifier setters to isXyz.
Change-Id: Icdcedff8d5af0777851200bacf54428a229d359e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148510
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-05-19 04:02:09 +00:00
Konstantin Shcheglov 0324ce28bc Use hasLegalReturnType flag instead of a type check.
Change-Id: If2caa49aad6e3300e0ffe5de23095d2e824fb3ca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148467
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-05-18 20:49:06 +00:00
Konstantin Shcheglov 3ebcc10acd Issue 41938. Report INSTANCE_MEMBER_ACCESS_FROM_STATIC for extension members.
Bug: https://github.com/dart-lang/sdk/issues/41938
Change-Id: I95364cb460eacf8076de9a12f4975eb7b1963916
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148501
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-05-18 19:36:17 +00:00
Konstantin Shcheglov b591ea11bc Add more data to debugging crash during linking.
Change-Id: I076cbec33d4e2c1e3e5d72c72c5a4657d2b94d1f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148500
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-05-18 19:30:57 +00:00
Konstantin Shcheglov a849f66762 Extract INSTANCE_MEMBER_ACCESS_FROM_STATIC tests.
R=brianwilkerson@google.com

Change-Id: I84be2de6602e910912984eba11b700ea2bc4a831
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148463
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-05-18 18:00:17 +00:00
Konstantin Shcheglov 08bad91aa3 Fix for crash 'C?.foo'.
Change-Id: I9e03b056c9df6c476de7fa29f412c1704d6c3185
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148183
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-05-18 02:43:47 +00:00
Konstantin Shcheglov 529f614eb3 Remove UnknownInferredTypeElement.
Change-Id: Iae13ed84dec9a041bd3ed3d470e867628f776da0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148233
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-05-15 21:37:42 +00:00
Konstantin Shcheglov 80bd1d5970 Change the unknown type presentation to '_'.
...to align with the changes to the inference spec.

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

Change-Id: I31132f1df53924970a987d936bc3a90e9c824f90
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148232
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-05-15 20:03:14 +00:00
Konstantin Shcheglov a6148714f0 Annotate two failing inference tests with the corresponding issue.
R=brianwilkerson@google.com, paulberry@google.com

Bug: https://github.com/dart-lang/sdk/issues/25824
Change-Id: I485f87f526c1251363349e9d354eefdc57d24120
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148200
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-05-14 21:32:25 +00:00
Konstantin Shcheglov 8ae35ec089 Remove SetLiterals specific subtypes of tests.
Change-Id: Ic39e515249d7caab11ce686b2c1fe6ebab6a8456
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148148
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-05-14 19:33:44 +00:00
Konstantin Shcheglov 9c9b17d2f7 Remove deprecated 'typeSystem' parameter from InheritanceManager3.
Change-Id: I1a33fe5b9f7298aeb786f4421ee0e6913b066e76
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148143
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-05-14 19:12:49 +00:00
Konstantin Shcheglov 085e3d8464 Remove deprecated 'enableSuperMixins' from ErrorVerifier.
Change-Id: Ib4d74cf8f9d36d4e2917a171e8ea2dfceff7a603
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148142
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-05-14 19:02:01 +00:00
Johnni Winther 383a8ea857 [cfe] Initial support for external fields.
Change-Id: Iccee87f40df395c928dc1a9dc81ddad8813a5000
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147906
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2020-05-14 18:34:06 +00:00
Konstantin Shcheglov e388956b81 Use TypeSystem.isNullable() for MISSING_RETURN.
Change-Id: I90d79b4d605eb0ad5537f323e0f019a5730c1095
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148023
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-05-14 00:03:13 +00:00
Konstantin Shcheglov ea4e4367bc Fix MISSING_RETURN after function expression return type inference.
Bug: https://buganizer.corp.google.com/issues/156495751
Change-Id: I0b994d9023cf9282048b2ec9462190f579ce620d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148001
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-05-13 21:46:42 +00:00
Kevin Moore 0acc564104 Fix a number of URIs referring to dartlang.org
Change-Id: Ie1373e93092023caf5e0bcfd6bb88bfb422d5daf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147921
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
2020-05-13 18:24:12 +00:00
Konstantin Shcheglov 6e5cf35ee6 Use single flag in ElementDisplayStringBuilder, make it required.
Change-Id: I4e6d8b16ff24fd0fdf40efe6b2f4a44d6c6596f3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147940
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-05-13 16:59:51 +00:00
Konstantin Shcheglov 251933ca62 Implement futureValueType() operation.
R=brianwilkerson@google.com, paulberry@google.com

Change-Id: I34cca0aa0ee8ca8237a5bfb3c123bc732a279c4d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147824
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-05-13 15:36:16 +00:00
Konstantin Shcheglov 9d0d7a675c The formal spec has a typo around async functions and void.
R=brianwilkerson@google.com

Change-Id: Idd87f69a6eb406f911d11c923ee13eb1cef6c55b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147840
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-05-13 15:28:33 +00:00
Konstantin Shcheglov f5b1e83a93 Add debug information to a potential reason for linking crash.
Change-Id: I069b9872becbd0c246d354a2c60a4e1166b5dd18
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147860
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-05-13 15:28:11 +00:00
Konstantin Shcheglov 0861470197 Update ReturnTypeVerifier to be what the spec says.
See also https://github.com/dart-lang/language/issues/960

Change-Id: I5cfc672e7902fba15ec940afb07f324cd21da686
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147680
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-05-12 23:54:06 +00:00
Sam Rawlins b9e10e3870 analyzer: Remove unused imports
These were previously undetected due to https://github.com/dart-lang/sdk/issues/38784

Change-Id: I546f698d992142f5e1d1260fba1cfd4a5308a0d0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147701
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-05-12 23:45:24 +00:00
Paul Berry 275b922ee8 Revert recent parser fixes
Commit 1f9b5c1996 causes tests to fail
in angular when rolled into internal sources; the other two commits
need to be reverted as well to avoid merge conflicts.

This reverts commit 1f9b5c1996.
This reverts commit c40b24da48.
This reverts commit 96df1f9e6c.

Change-Id: Ic4e55181ef60e825ce4409a9a9528ecbf19c39c4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147822
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-05-12 22:02:09 +00:00
Konstantin Shcheglov 8963497d55 Ensure that URIs end with '/', fixes empty 'packageUri'.
Bug: https://github.com/dart-lang/pub/issues/2482
Change-Id: Ibaf94b44532b44c9a87c05cb8c6eaa523fbbb6ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147800
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-05-12 19:30:51 +00:00
Konstantin Shcheglov 5ab1687ee7 Create updated ParameterElement(s) using replace().
Change-Id: I1038f119e9678eb6bb24fa4b10513a28a701d782
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147424
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-05-12 17:04:09 +00:00
Danny Tuppeny 1a328bed36 Restore default values in hover element descriptions
Bug: https://github.com/dart-lang/sdk/issues/41844
Change-Id: Ibb6197cba25adb6507a7cd35aff97b134a7e910f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147549
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Danny Tuppeny <danny@tuppeny.com>
2020-05-12 08:24:09 +00:00
Konstantin Shcheglov 2ebd8e22a0 Add DartType.isDartCoreIterable
R=brianwilkerson@google.com

Change-Id: Ia21b8f66bc19467b1b4e84c0cd9d59d6553a58a1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147600
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-05-11 22:06:20 +00:00
Konstantin Shcheglov 4ead8ad652 Resolve operands of '==='.
Change-Id: Ib6fddcb62dfeb840276e188b77119e661c7ce5cf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147440
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-05-11 17:22:58 +00:00
Konstantin Shcheglov 29c340fb94 Perform return type inference using BodyInferenceContext.
Change-Id: I713a01add6da45aa03d6e15d1374297182d39116
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147420
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-05-11 17:20:57 +00:00
Konstantin Shcheglov 4e520824f5 Deprecated DartType.isObject
R=brianwilkerson@google.com

Change-Id: If588b23668764b07c99e327281bfeb11c8e31367
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147423
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-05-11 16:14:37 +00:00
Konstantin Shcheglov 1120d64149 Simplify InterfaceType.isDartXyz implementations.
R=brianwilkerson@google.com

Change-Id: I152d49f274b78c54630e8e8a288f8cc82d6080af
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147422
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-05-11 16:14:17 +00:00
Jens Johansen 96df1f9e6c [parser] Add ErrorToken for ignored (unmatched) end parenthesis, brackets etc
Change-Id: Idb57295700988d71321743af9782134b02562311
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/146240
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-05-11 14:46:47 +00:00
Konstantin Shcheglov 81780821e8 Extract FunctionExpressionResolver.
R=brianwilkerson@google.com

Change-Id: I363f0bfe91328c2729fe268d2dcb79f61d51b91c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147338
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-05-09 18:19:09 +00:00
Konstantin Shcheglov b8b9f89b69 Extract ReturnTypeVerifier.
Change-Id: I1dc7333faf40f227b8be0b8fbfc4b2bd7e8e84eb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147382
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-05-08 20:31:27 +00:00
Konstantin Shcheglov da02189198 Split computing interface for class and mixin.
Change-Id: I1d936dd7aee83f4436183f2e20433cfed7ebc747
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147330
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-05-08 16:08:39 +00:00
Sam Rawlins 478a8f2a16 analyzer: Do not report non-EOL doc comments in codes.dart
This codifies Brian's comment on a recent CL [1].

[1] https://dart-review.googlesource.com/c/sdk/+/145571/2/pkg/analyzer/lib/src/error/codes.dart#5496

Change-Id: Ie9def6fe9979e57b77ee951d38c701d6300fad26
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147041
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-05-08 08:10:49 +00:00
Konstantin Shcheglov 7161036eb7 Fix avoid_unused_constructor_parameters in analyzer.
Bug: https://github.com/dart-lang/sdk/issues/41797
Change-Id: I6fb201b549a599b12d022abd6108d3418966c4f0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147221
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2020-05-08 04:44:58 +00:00
Sam Rawlins d0d0952546 analyzer: Report unused public members of private and unnamed extensions
Fixes #41592

Change-Id: I95b79724bfcfc5d48b8f6cca61c6a3a681de3662
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144353
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-05-07 15:34:48 +00:00
guidezpl 094fcd78a1 Add test_driver directory to @visibleForTesting whitelist
Bug: https://github.com/dart-lang/sdk/issues/41151
Change-Id: I2d620ef296c3f9fc1d6e56fec645a4530416a622
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140867
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-05-07 06:45:37 +00:00