3303df8102
Adds a 'severity' field to diagnostic messages and replaces all addWarning and addNit functions by a generic addProblem, which uses the intrinsic severity of the message. Eventually, errors should also be reported this way. A special severity value maps into either warning or error for Dart 1 and Dart 2, respectively. Most Dart 1 warnings are in this category. Fixes some 320 failures of DDK test expecting a compile-time error. These were previously masked by a workaround in the DDC error handler which has now been removed. Closes https://github.com/dart-lang/sdk/issues/31286 Change-Id: I6acea31b8cba7dec8b318e081d28f4eb4ebbf75c Reviewed-on: https://dart-review.googlesource.com/29160 Commit-Queue: Aske Simon Christensen <askesc@google.com> Reviewed-by: Peter von der Ahé <ahe@google.com>