Commit Graph

373 Commits

Author SHA1 Message Date
Konstantin Shcheglov dd033a6ab7 Report HintCode.NULLABLE_TYPE_IN_CATCH_CLAUSE.
Change-Id: I747fa9992243f811b4a98320a4ebd169f35daec0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143326
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-04-13 20:21:42 +00:00
Konstantin Shcheglov 3d19be30b5 Report errors for enum constants conflics.
This should fix:
language/enum/syntax_test/05
language/enum/syntax_test/06

Change-Id: Id9cfc9ebd3a39d7234ed7e898196b8d30f417877
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143244
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-04-13 17:52:32 +00:00
Konstantin Shcheglov 23a8788f6a Issue 41378. Update on-catch and throw for the spec changes.
Now it is not an error to use a potentially nullable type in on-catch.

But it is an error for throw an expression of type that is not
assignable to Object.

Bug: https://github.com/dart-lang/sdk/issues/41378
Change-Id: If0a198ae618cd01d03f45a46aa1efa6179df76ee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143220
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-04-11 20:08:03 +00:00
Jens Johansen 4ab3bda5db [parser] Change recovery for constructor; report errors in bad constructors
Change-Id: I3d656afce4a3ec14c7c099893a434abba3945ebf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140862
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2020-03-27 11:57:56 +00:00
Jens Johansen 137aeeb8a1 [analyzer] Sort entries in error.dart and syntactic_errors.dart
Change-Id: I1913b0dedc7a0100911c4cab3aeba5a30031bbbc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141120
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2020-03-26 14:03:18 +00:00
Konstantin Shcheglov 3586f4ccde Issue 41130. Report an error for any default List constructor invocation.
Bug: https://github.com/dart-lang/sdk/issues/41130
Change-Id: Ib9f440773f7a2ac68b9bcba8a5b380541298434b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140363
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-03-21 18:39:16 +00:00
Konstantin Shcheglov ef6c7efc9f Issue 40941. Report FINAL_AND_COVARIANT_LATE_WITH_INITIALIZER.
Bug: https://github.com/dart-lang/sdk/issues/40941
Change-Id: Ica0bbbdeee447c410cbfd64aea1a643711d21655
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139322
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-03-12 21:04:06 +00:00
Konstantin Shcheglov ad4762343b Issue 39876. Report DEFINITELY_UNASSIGNED_LATE_LOCAL_VARIABLE.
Bug: https://github.com/dart-lang/sdk/issues/39876
Change-Id: I855579c47ab8f932bb3977eb44d0c17d0ce5987a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139034
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-03-12 15:41:07 +00:00
Brian Wilkerson 60a81b0f51 Add hints to find equal elements in literal sets and maps
Change-Id: Ib930b49b338d7cb088b17909991934b16c4f1538
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138602
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-03-06 14:22:44 +00:00
Konstantin Shcheglov 72acbc18e6 Issue 40316. Report hint if @dart language version override is not before any declartion.
Bug: https://github.com/dart-lang/sdk/issues/40316
Change-Id: I787df83020835f930e21dd772faa848d375a8a78
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138388
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-03-04 23:32:13 +00:00
Konstantin Shcheglov f67cc65ecb Update tests and error code for void with type arguments.
R=brianwilkerson@google.com

Change-Id: I82c8c61bce2d841e06724d1d41dc10cac6f0c304
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138329
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-03-04 18:53:37 +00:00
Jens Johansen f828f00b59 [parser] Error recovery of type parameters on void
Fixes #39958.

Change-Id: I851bef762776f4b68f0fcb645d634019b8b32e81
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137925
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2020-03-04 14:02:35 +00:00
Brian Wilkerson 131502d752 Unify two error codes and improve the messages
Change-Id: Ic3be0dfeadce045c051304be5331a1828202d057
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138120
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
2020-03-03 17:53:11 +00:00
Konstantin Shcheglov ced8d66d25 Report HintCode.DEAD_NULL_CONDITION_FALSE/TRUE for non-nullable compared with null literal.
Change-Id: Iac41f17e6e41f5e99e2291889456db64f6f2c7ce
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137641
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-02-28 01:58:33 +00:00
Brian Wilkerson cc45c9358b Rename another diagnostic code
The diagnostic applies to both the if-null expression ('??') and the
compound assignment expression ('??='), so it seems like the name should
be more general.

Change-Id: I004cc2924ef97fcbd2168f070380ff17152cbb0f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136903
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-02-23 17:11:24 +00:00
Brian Wilkerson 33e6f4af33 Rename a diagnostic code
Change-Id: I0b712af35d4a904bd0507b63ca52595cfcc7de2d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136728
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-02-21 18:34:20 +00:00
Konstantin Shcheglov 6635b1d9a0 Issue 40396. Report BODY_MAY_COMPLETE_NORMALLY when a body that is expected to return a potentially non-nullable type may complete normally.
Bug: https://github.com/dart-lang/sdk/issues/40396
Change-Id: I58d48a5191950f55d6a59b163d122150e7ad3d09
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135582
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-02-14 19:13:03 +00:00
Brian Wilkerson 5340bbff98 Add context messages for cases where different types have the same name
Change-Id: I2a83f1d5a7c3a8852a6cb91b809bf79c4dbfef71
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135341
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-02-11 17:42:33 +00:00
Konstantin Shcheglov eeaa9085ae Issue 40394. Updates to switch / case validation.
No changes to enum validation yet.

Bug: https://github.com/dart-lang/sdk/issues/40394
Change-Id: I2cca426b5b59d18a6244622f84884a3747a07190
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134888
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-02-07 22:38:40 +00:00
Konstantin Shcheglov a1d232a9b4 Issue 40392. Report SWITCH_CASE_COMPLETES_NORMALLY when switch/case completes normally.
Bug: https://github.com/dart-lang/sdk/issues/40392
Change-Id: I15c80d0667be1c783cb21870b9f92ee98a4f3042
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134245
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-02-04 17:46:48 +00:00
Johnni Winther 42246f7f96 [cfe,analyzer] Disallow type parameters on operator methods
This was never supported by the grammar but unfortunately allowed by
both the analyzer and the CFE.

Change-Id: Id669c934fe08eda41973d6d2cef8340da2e7d72c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133591
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2020-01-31 14:05:02 +00:00
Konstantin Shcheglov b3a1f053a3 Issue 40333. Extract GetterSetterTypesVerifier, report GETTER_NOT_SUBTYPE_SETTER_TYPES for NNBD.
Bug: https://github.com/dart-lang/sdk/issues/40333
Change-Id: I265d535956204644859b05d02dd39a0bfdc8c19a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133640
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-01-29 02:37:14 +00:00
Konstantin Shcheglov 2aee6026cb Use NullableDereferenceVerifier in BoolExpressionVerifier.
So, we report UNCHECKED_USE_OF_NULLABLE_VALUE in one place, and only
during resolution.

Change-Id: I0c89f77afe1c311287906e27458a226965545369
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/132171
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-01-17 17:20:34 +00:00
Konstantin Shcheglov 8c82979b76 Revert "Remove StrongModeCode.IMPLICIT_DYNAMIC codes."
This reverts commit a3ea61c3d0.

We decided that analyzer should continue to provide this
functionality, at least until we have a better replacement.

Bug: https://github.com/dart-lang/sdk/issues/40129
Change-Id: Idd5ae37a6b8f8d39d374df2b0aaa04d7ee8bf3d6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131723
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-01-16 17:37:57 +00:00
Konstantin Shcheglov 9ae4849386 Report LATE_FINAL_LOCAL_ALREADY_ASSIGNED.
Change-Id: Ifa1706b6aecf53ec15578b13a4cc5931fbba3b2d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131882
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-01-15 19:28:56 +00:00
Konstantin Shcheglov 924f4e0549 Downgrade receiver of type Never to hint.
Bug: https://github.com/dart-lang/sdk/issues/40057
Change-Id: I49f56b7efa4c88a86fda071c6063b308062784bf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131721
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-01-15 01:33:24 +00:00
Konstantin Shcheglov b7326f2807 Fix deferredPrefix.loadLibrary() resolution to check for extra arguments.
R=brianwilkerson@google.com

Change-Id: I75cab6bf235110e32e4d9c21d656c12eb42685d3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130600
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2020-01-07 22:30:19 +00:00
Sam Rawlins 4c6757a9ff new analyzer compile-time error: load_library_takes_no_arguments
Fixes #38281

Change-Id: I8a626a9e006a988bcd449e6aa89338afc716ad94
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129901
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-01-07 05:20:12 +00:00
Brian Wilkerson 6e8f0e1035 Unify two diagnostics for documentation purposes and improve the highlighting range associated with them
Change-Id: I02ff33cde1d56a24b2eccf782dc8927f02746235
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130440
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-01-07 01:38:12 +00:00
Brian Wilkerson 877d6f745d Improve the range selected for const_constructor_with_non_final_field
Change-Id: I168e92c32b581dffcad25804161b56f4d99c1dd1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130300
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-01-05 23:50:22 +00:00
Konstantin Shcheglov 850ca2d410 Add Element.getDisplayString(withNullability), use it in analyzer.
R=brianwilkerson@google.com

Change-Id: Ic4924e19612f2a7713f9a3f2059a880ebff9d2db
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129983
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-01-01 19:01:14 +00:00
Konstantin Shcheglov 4a6cd94f61 Deprecate 'ErrorReporter.source' setter.
R=brianwilkerson@google.com

Change-Id: I6a0878f0abc206311299281919d41c8ef3b5fd3b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129962
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-01-01 18:52:14 +00:00
Konstantin Shcheglov 7b7d8789ca Use WRONG_NUMBER_OF_TYPE_ARGUMENTS instead of two other equivalent error codes.
R=brianwilkerson@google.com

Change-Id: Ibb5ea7d65df75655eaf2d43fba1110740be39912
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129833
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-12-31 20:27:03 +00:00
Konstantin Shcheglov e2795c41ee Move ResolverErrorCode codes into CompileTimeErrorCode.
Change-Id: Ie8a1422c86da5c4f04fbd4422a758289bf9e078c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129621
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-12-26 22:12:44 +00:00
Konstantin Shcheglov 8a0d30d4e2 Fix annotate-overrides in analyzer.
R=brianwilkerson@google.com

Change-Id: I7a587daf9715ded6450b28ecf3892ce4181aeb37
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129421
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-12-23 00:02:37 +00:00
Konstantin Shcheglov d321f6e452 Issue 39773. Don't report MISSING_DEFAULT_VALUE_FOR_PARAMETER when no default value is allowed.
This partially reverts https://dart-review.googlesource.com/c/sdk/+/126801

Bug: https://github.com/dart-lang/sdk/issues/39773
Change-Id: Ib147ed770d9bf328dd7792a37a72291070411964
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129142
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-12-19 23:35:13 +00:00
Konstantin Shcheglov 78c2a6a101 Remove StrongModeCode.DYNAMIC_INVOKE
Change-Id: I99c158823bf9c30e6950619548f09eb7070607ac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128844
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-12-18 17:37:31 +00:00
Konstantin Shcheglov a3ea61c3d0 Remove StrongModeCode.IMPLICIT_DYNAMIC codes.
Internal presubmit is green.
https://test.corp.google.com/ui#id=OCL:286100469:BASE:286100526:1576636805426:a3f44b2a

Change-Id: I6a239a39c5b71418d5bdd4f152b60fea9322099b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128821
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-12-18 07:02:15 +00:00
Konstantin Shcheglov b6e051e2c8 Use StaticWarningCode.DEAD_NULL_COALESCE instead of hint, use isStrictlyNonNullable().
Change-Id: I626745a7114b9403419d62307b79282f46fff985
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128803
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-12-18 01:55:05 +00:00
Konstantin Shcheglov 2655f82326 Report UNNECESSARY_NULL_AWARE_CALL for IndexExpression and cascades.
R=brianwilkerson@google.com, paulberry@google.com

Change-Id: Iea413e69fd9f92f99bb8a3f9f1f9c399fa61e719
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128802
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-12-17 23:05:54 +00:00
Konstantin Shcheglov b89eb6cf16 Stop reporting INFERRED_TYPE codes.
Internal presubmit is green.
https://test.corp.google.com/ui#id=OCL:285886840:BASE:285910812:1576561195953:c64215aa

Change-Id: I6616a8ce0fd5188ae9405cdc4b82a2006fee675d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128571
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-12-17 17:01:56 +00:00
Konstantin Shcheglov fe36f5db02 Remove reporting NON_GROUND_TYPE_CHECK_INFO.
Change-Id: If7303fd2f24a233122cc354ad11eeedd1225c800
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128568
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-12-17 00:32:40 +00:00
Konstantin Shcheglov c5c4690886 Stop reporting several StrongModeCode(s).
Change-Id: I8d2f165a6fb570f82b8d2506dfa5602f8e89bba1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128342
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-12-16 00:58:06 +00:00
Konstantin Shcheglov 6c99171686 Report CompileTimeErrorCode.EXPORT_LEGACY_SYMBOL
Change-Id: Icd43121a4d7f20fdecc1bff8ced6b9378ce94149
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128377
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-12-14 01:14:55 +00:00
Sam Rawlins 40718899fe Fix pedantic 0.9 lints around collection literals and spreads
Change-Id: I64277c36fbeb4ea7a1bb429a8e0a40203520c883
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128380
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-12-14 00:15:41 +00:00
Sam Rawlins c01b52cb0f Remove duplicate 'DEFAULT_VALUE_IN_FUNCTION_TYPE_ALIAS' already reported by fasta
Fixes #39524

Change-Id: Iaf1c095a9f80809cb8b7e0edd966ab1b22c89abc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127544
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-12-11 16:22:48 +00:00
Konstantin Shcheglov 1cc5d6927a Deprecate ErrorReporter.reportTypeErrorForNode()
We always want to convert DartType(s) to their String presentations
using getDisplayString(), never using toString(). Also it is OK  to do
some processing during error reporting, it should be rare operation.

R=brianwilkerson@google.com

Change-Id: I57b80cdd7e91de2eb0d06aa84e15ffc0f577090b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127960
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-12-10 18:41:35 +00:00
Konstantin Shcheglov 620dd7dab5 Use just DartType.getDisplayString() in ErrorReporter.
R=brianwilkerson@google.com

Change-Id: Iaddf2e8cb9fb69dab3542766e8bc6bb82e9d726f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127860
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-12-10 17:02:35 +00:00
Konstantin Shcheglov 9456316b51 ErrorReporter should know isNonNullableByDefault.
So, when we call DartType.getDisplayString() we know if the type
presentation should include nullability suffixes.

This fixes many, but not all places where we need to present types.
There are places where we don't go through ErrorReporter, but call
ErrorListener directly. I plan to replace all these with ErrorReporter.

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

Bug: https://github.com/dart-lang/sdk/issues/39651
Change-Id: Ic77a556e7834d8f757c8b13eed37ed1d34f47348
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127744
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-12-10 01:31:22 +00:00
Konstantin Shcheglov c17aff87e1 Restore skipping all dynamic type arguments in DartType.displayName
There is one internal client that currently depends on such presentation.
This will unblock rolling analyzer, then we will fix the client, and
remove this skipping code in analyzer.

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

Change-Id: I0d6387892d12326d658800069dd8a60faa589405
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127488
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-12-07 02:24:34 +00:00