Commit Graph

10502 Commits

Author SHA1 Message Date
Brian Wilkerson 536b466be3 Add tests for unused_element for mixins
I also renamed a couple of existing tests, but the two tests for
detecting unused mixins are the only substantive changes.

Change-Id: I29001c9c1782395cd2824af6f8a25696e387bd3e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156845
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-08-03 21:34:22 +00:00
Konstantin Shcheglov 7723fbb46d Don't report DEAD_CODE hint for all required switch/case statements when legacy.
Bug: https://buganizer.corp.google.com/issues/162213706
Change-Id: I2ad6807194a974e6dc40f5f1cdd17f23196371a7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156941
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-08-03 21:11:02 +00:00
Sam Rawlins c59cdee365 Analyzer: Move COULD_NOT_INFER tests out of inferred_type_test
Change-Id: I4470617c23b8e4a08370c1da66f945719e58f7a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156846
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-08-03 04:42:43 +00:00
Sam Rawlins 2d98d25e71 Analyzer: Remove instantiateToBounds tests from inferred_type_test
The NOT_INSTANTIATED_BOUND error is thoroughly tested in
not_instantiated_bound_test.dart. The resynthesized elements are
thoroughly tested in resynthesize_common.dart, including
notSimplyBounded classes.

Change-Id: I0f2380133900149bbc5cdc2d996ed071601f2421
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156844
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-08-02 21:12:12 +00:00
Konstantin Shcheglov 365525432a Issue 42788. Report MISSING_REQUIRED_ARGUMENT for 'call'.
Bug: https://github.com/dart-lang/sdk/issues/42788
Change-Id: Icece8f0e9865e659187d556c582929efcb7d242e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156841
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-08-02 19:44:23 +00:00
Sam Rawlins 7e6c55e3aa Move TopLevelInferenceTest off StrongTestHelper
Change-Id: I847de154a89e2bca1ca6e0028b7c4861ad9a0f23
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156860
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-08-02 15:24:25 +00:00
Sam Rawlins d169af6f7d Analyzer: remove unnecessary this
Change-Id: I85a769e0c32159ac2a6422d3a60d160bda40d9b4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156488
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-08-01 06:16:31 +00:00
Sam Rawlins ad5bcf16f1 Analyzer: remove unnecessary this in lib/src/summary,2
Change-Id: I110ffd76b1d04f83bbe08b79937c2ef6d02987a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156487
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-08-01 06:12:11 +00:00
Sam Rawlins b8ce4baf7e Remove 'checked mode' from checked_mode_compile_time_errors
Change-Id: I6576eb186149d540ce2dbc0e0aab7177ff4727be
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156484
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-07-31 19:20:58 +00:00
Brian Wilkerson 4776ac1f89 Fix a couple of recently introduced hints
Change-Id: I68b653ea44e548a2789f7e720d6abfddb7cfb08c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156721
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-07-31 17:33:58 +00:00
Sam Rawlins ea6bde577d Analyzer: remove unnecessary this in lib/src/generated
Change-Id: I2fb3d84e054bce192604690804f321723730e19f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156603
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-07-31 03:37:05 +00:00
Konstantin Shcheglov 207d642df1 Set min SDK to 2.7.0, so that extensions work.
Change-Id: Id915ffa39e9a8dde537653699674adfaecf3ed27
Bug: https://github.com/dart-lang/sdk/issues/42888
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156602
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-07-31 03:29:26 +00:00
Sam Rawlins 9f49ef9d82 Strict-inference: be lenient on @optionalTypeArgs classes
Fixes https://github.com/dart-lang/sdk/issues/42882

Change-Id: I01c7b12cdb36d06ab9d44fb080b15b30684cba3a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156583
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-07-30 22:48:04 +00:00
Konstantin Shcheglov caaa2a752b Add TypeVisitorWithArgument and DartType.acceptWithArgument().
Bug: https://github.com/dart-lang/sdk/issues/40478
Change-Id: I2a8d196bf3ba41f771e390acb7eade5cdd5f1e6a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156563
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-07-30 21:33:04 +00:00
Konstantin Shcheglov bd528bfbd6 Updates and tests for ReplaceTopBottomVisitor, fix hints.
Bug: https://github.com/dart-lang/sdk/issues/42196
Change-Id: If9350ccc4ad2908a2c7cde7281fe9e2f01c52f97
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156561
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-07-30 19:12:38 +00:00
Mike Fairhurst c9ee369a7c [analyzer] Fix #41926 super bounded types broken for NNBD
`DartType.replaceTopAndBottom` needs to do different things for
NNBD/legacy code. Move this behavior into TypeSystemImpl with its own
responsible visitor.

Fixed: 41926
Change-Id: Ib0eca2384276998d5fdf99f2d9a210d86c999afa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156443
Auto-Submit: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-07-30 16:37:48 +00:00
Konstantin Shcheglov fb0578159e Convert paths to absolute and normalized in analyzer_cli arguments.
See https://github.com/dart-lang/linter/pull/2189#issuecomment-665984938

Change-Id: I6becb616dd8bcb0c9945ea5ad5ac6119bb93e330
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156441
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-07-30 15:00:58 +00:00
Sam Rawlins f925019c5a Add tests for strict-inference on instance creation, fix constructor name
Fixes https://github.com/dart-lang/sdk/issues/42881

Change-Id: I0f21f106936e88c9e195fd789408ec590ee4f44d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156423
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-07-30 14:55:38 +00:00
Konstantin Shcheglov 3cb837ab54 Remove classes from InheritanceManager when remove libraries from LinkedElementFactory.
Change-Id: I4e5e824d0aa10838d0a717cae86d01db9a609dca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156422
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-07-30 07:34:02 +00:00
Mike Fairhurst 59600f2b46 [analyzer] Improve existing non-generative constructor errors
As opposed to the parent CL which creates a new error for cases where no
non-generative constructor is available at all, these improvements
include a bugfix to the previous error message.

The previous message was incorrect in saying 'expected {0} but factory found',
because the argument passed to '{0}' was the factory constructor that
was found, rather than any kind of expected constructor signature.
Fixed.

Also, for implicit constructors, break out the error message to
deliberately explicitly describe that this affects the implicit
constructor.

I considered making an error code for implicit super initializers as
well, (ie `class Foo extends Bar { Foo(); }`), but don't think it is
necessary/common/etc.

Change-Id: I0643ad00abbfb2848cbd2f8f1f83e7c33d4fb846
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155831
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-07-30 05:12:40 +00:00
Mike Fairhurst e0164ec47e [analyzer] Fix #25874, confusing error for extending Exception.
In the case of extending Exception, the raised error is around the
configuration of the constructors. However, there is no valid
configuration of constructors to be found, and therefore, the better
user facing message is to say that the class cannot be extended as
written.

Change-Id: I5950d438877c450c44cdc914f9f20d7779a64768
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154126
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-07-30 05:12:40 +00:00
Devon Carew 22b05dbf7a [analyzer] fix a grammar issue for invalid_null_aware_operator_after_short_circuit
Change-Id: I7c2548999757e3f8bc314426be7564165c3d9a33
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156442
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2020-07-30 04:35:30 +00:00
Sam Rawlins 1dd3fccee9 Update strict-inference to not report 'unreferenced' parameters
This is the implementation CL for
https://github.com/dart-lang/language/pull/599

Change-Id: Icb0af8542a72093a8bdd599c768d5eff46841b9c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155143
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-07-30 00:54:00 +00:00
Sam Rawlins f23f450e11 Analyzer: Move CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH to compile-time
Many of the tests were highly redundant. Subtyping has been
consolidated, so the tests don't need to cover a dozen different ways
to subtype a class.

Change-Id: I04448790d3a74690d0edb57f15146a6c3b8f2173
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156400
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-07-30 00:34:29 +00:00
Konstantin Shcheglov 219107cca0 Report INVALID_ASSIGNMENT on the cascade target.
https://dart-review.googlesource.com/c/sdk/+/155380 has tests that
show that it is otherwise hard to specify where the offending
expression is.

Change-Id: I8cdbc3d974148d644b75889a8afd921a2a2716cd
Bug: https://github.com/dart-lang/sdk/issues/42865
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156067
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-07-29 23:04:49 +00:00
Konstantin Shcheglov 0b4896ac94 Resolve invalid prefix.name TypeName(s) to dynamic.
Change-Id: If449fcb37c2a095d37d34ea7c068fa85edb112c9
Bug: https://github.com/dart-lang/sdk/issues/42877
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156341
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-07-29 21:08:08 +00:00
Konstantin Shcheglov 86057443c4 Issue 42837. Use legacy erasure in LUB computation in opt-out libraries.
Bug: https://github.com/dart-lang/sdk/issues/42837
Change-Id: Id61e37404d6d2e8452daed2bbd730f32a8687ea6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156320
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-07-29 20:06:35 +00:00
Sam Rawlins d4f912dadb Analyzer: Move all remaining tests from compile_time_error_code.dart and remove
Change-Id: Id3c2a3df6aea0437b9e0798040ac76fa96a01215
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156080
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-07-29 02:51:50 +00:00
Brian Wilkerson 58a6e3c478 Rewrite handling of ignore comments to use token structure rather than regex
This also captures the information needed for the hints we want to add
around duplicated, erroneous and unnecessary ignore comments.

Change-Id: Ibafa2a92a02cf8113c222680f4868c38166d94e8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155847
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-07-28 15:18:08 +00:00
Brian Wilkerson 4a268b764c Support const subclasses of visitor classes (issue 42853)
Change-Id: Idee546d25a4cb96d790d966695c852c22f4c3392
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156064
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-07-28 13:54:18 +00:00
jlcontreras 355cade14f Add experiment flag for Value Classes
Change-Id: I94b42676ed233c3d421ac41be1c74dd90c74501e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156005
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Javier López-Contreras <jlcontreras@google.com>
2020-07-28 12:16:08 +00:00
Sam Rawlins de0848e7ea Analyzer: Move tests out of old test file into diagonstics.
* Add non_const_call_to_literal_constructor to test_all.
* Clean up non_const_call_to_literal_constructor to avoid unused variables.
* Update NON_CONST_MAP_AS_EXPRESSION_STATEMENT tests to be failing tests.

Change-Id: I1ca9e18372c7b5acc7b8670f81ed89ed0aa18825
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155927
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-07-27 22:18:48 +00:00
Konstantin Shcheglov f64d6dbb4f Move and refactor LUB tests.
R=brianwilkerson@google.com

Change-Id: Ie17fd6f48d76222107a122c17ce58c00f5eeb186
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156062
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-07-27 21:34:38 +00:00
Konstantin Shcheglov 7c7e931c14 Update reporting INCONSISTENT_LANGUAGE_VERSION_OVERRIDE on part directives.
Change-Id: I100260b19d07c6ff7d172e9c31d4f99281a17807
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155924
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-07-27 16:45:15 +00:00
Konstantin Shcheglov c21128767e Use more shared asserts in UP/DOWN tests.
R=brianwilkerson@google.com

Change-Id: Iffd0d6d67a7606fea46fd5c422ceb928df031a6b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155921
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-07-27 16:44:49 +00:00
Konstantin Shcheglov 2195fe308b Don't create artificial PrefixedIdentifierImpl to check for ignored undefined.
Change-Id: I8ef06680b4d87ba017abeb5b3a70999eed25fca0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155920
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-07-27 16:44:37 +00:00
Konstantin Shcheglov 8de8a1c226 Move codes from StaticTypeWarningCode into CompileTimeErrorCode.
They are all errors now.

Change-Id: If48d38e38e845fd5b5a950dd5514bf1cbbce03d8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155880
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-07-27 16:44:15 +00:00
Sam Rawlins 01c217ecc9 Analyzer: Move tests for 5 codes to diagnostics/
Change-Id: I6545819d659f18b0bbd0cf79b10c564a0bd66777
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155848
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-07-27 04:56:14 +00:00
Sam Rawlins 1a829bbde0 Analyzer: Recategorize COULD_NOT_INFER as CompileTimeErrorCode
Change-Id: I2aec1fd6499fcbcc35e7cf9b765dd43559d3ef67
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155846
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-07-26 22:27:39 +00:00
Konstantin Shcheglov 70aa3ac534 Update verify_diagnostics_test after moving to CompileTimeErrorCode.
TBR

R=brianwilkerson@google.com

Change-Id: I5a12ca2bfc0853563e2574644b6e74b0456e8629
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155922
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-07-26 21:05:43 +00:00
Konstantin Shcheglov ba92b78acd Move errors from StaticWarningCode to CompileTimeErrorCode.
Bug: https://github.com/dart-lang/sdk/issues/42821
Change-Id: I153c48d7a2e4a02026928e6203aacf8f2dc029ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155849
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-07-26 04:19:25 +00:00
Konstantin Shcheglov 0fcd35f653 Use Scope lookup directly in ReferenceResolver.
R=brianwilkerson@google.com

Change-Id: Ic066b9a6470b628e1663c10e452c299e850db6d3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155845
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-07-25 22:16:17 +00:00
Konstantin Shcheglov 4de9f9f75a Sort error / hint codes.
As a preparation for https://github.com/dart-lang/sdk/issues/42821

R=brianwilkerson@google.com

Change-Id: If154956f12591a1665e497885e3c2868497e614f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155834
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-07-25 21:10:57 +00:00
Konstantin Shcheglov 8745cd5323 Use new Scope directly to simplify TypeNameResolver.
Change-Id: Ib3e78f2faca8a8cbdfb16d1a1bf5dc414cbf01ac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155830
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-07-24 23:51:18 +00:00
Konstantin Shcheglov bf411fcc10 Prepare to publish analyzer 0.39.15.
Change-Id: Ie7439fa98cd6d9b4b1e5ffb5ff81a16e8ddaf97b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155832
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-07-24 23:28:17 +00:00
Konstantin Shcheglov 6fc6c476b0 Updates for typed literals resolution tests.
Fixes for comments on https://dart-review.googlesource.com/c/sdk/+/155680

Change-Id: I7667fe0f323bce1503a15425a654af641ee2a6ce
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155820
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-07-24 21:46:39 +00:00
Konstantin Shcheglov ac71a391a3 Add TypeSystemImpl.futureOrBase (), stop using iterable/mapForSetMapDisambiguation.
Change-Id: I44e2888751d4a60fd79468cd184d218f16279637
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155724
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-07-24 20:10:28 +00:00
Konstantin Shcheglov b61e229a6d Issue 41065. Remove unnecessary null workaround.
Bug: https://github.com/dart-lang/sdk/issues/41065
Change-Id: I328b334fbdf4d4c77453cca56ae0c42ae43e8ee3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155822
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-07-24 19:35:16 +00:00
Konstantin Shcheglov 9282f1b14a Fix for invalid implicit downcast in InterfaceType.allSupertypes.
R=brianwilkerson@google.com

Change-Id: Ic4480fbab8ea8da6e9e8bb03ad95af66b3622618
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155821
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-07-24 19:33:15 +00:00
Sam Rawlins c65b444145 Analyzer: Move TOP_LEVEL_CYCLE to be a compile-time error
Also remove duplication with RECURSIVE_COMPILE_TIME_CONSTANT.

Also write some tests for TOP_LEVEL_CYCLE.

Change-Id: I33cb765236a83bd925f9f0c6e65ac9398761c699
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155701
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-07-24 15:11:38 +00:00