Sam Rawlins
ff6ddd2972
Analyzer: deduplicate errors when operator defined with bad parameters
...
If an operator declaration has both too many parameters, and one or more
optional parameters, just report the former error.
This is better UX, and is closer aligned to what the CFE reports.
Change-Id: I1f30ab9564f4bcdc49c1f3317add6c55cca29597
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/185201
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2021-02-16 22:39:04 +00:00
Brian Wilkerson
11e7cdcfd1
Unify two error codes for documentation purposes
...
Change-Id: I730a0ee287e7d54bace9fdf84a02be5c3f4da017
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178520
Reviewed-by: Samuel Rawlins <srawlins@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2021-01-11 23:12:20 +00:00
Johnni Winther
8103c90dbf
[cfe] Use combined member signature in override inference in legacy code
...
+ emit only one message per method given that it now always has the
same root cause, namely that the combined member signature does not
exist.
Closes #31797
Change-Id: Id89a5557c5fdda1db087c20cbe92847dd08216a3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175305
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2020-12-09 17:33:20 +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
Erik Ernst
dc7c947a9c
Add/change tests to cover new compile-time errors
...
Cf. spec update in https://github.com/dart-lang/language/pull/1083 .
Change-Id: I99675cf761bfeacf4fd5a971380c548cc4997852
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153963
Commit-Queue: Erik Ernst <eernst@google.com >
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com >
2020-07-16 11:17:33 +00:00
Johnni Winther
45af99177b
[cfe] Check overrides on operators
...
Change-Id: Ib250117553b2e22c6c71b78bf354be1162bc9981
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151235
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2020-07-08 08:45:34 +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
Robert Nystrom
fc1b1ecc71
Move files under language_2 into subdirectories.
...
Change-Id: Idbcc965a27e9ffeedf5e0a1068b019de4193070f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127745
Commit-Queue: Bob Nystrom <rnystrom@google.com >
Reviewed-by: Alexander Thomas <athom@google.com >
2019-12-11 19:18:00 +00:00