From cfef20a52b8be65a665da0662b9f660db37ffd9e Mon Sep 17 00:00:00 2001 From: Paul Berry Date: Tue, 10 Feb 2026 12:26:42 -0800 Subject: [PATCH] [messages] Convert error reporting in pkg/compiler to use withArguments. Changes the test `pkg/compiler/test/end_to_end/user_crash_test.dart` so that when it reports the `cantReadFile` diagnostic, it does so using `withArguments` rather than `withArgumentsOld`. Once all calls to `withArgumentsOld` are removed (this is one of the last), I will delete it, which will substantially simplify the diagnostic reporting infrastructure in `pkg/front_end`. Change-Id: I6a6a696492b8beb73819528c4c48902f6cd57df2 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/479062 Commit-Queue: Paul Berry Reviewed-by: Nate Biggs --- pkg/compiler/test/end_to_end/user_crash_test.dart | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/compiler/test/end_to_end/user_crash_test.dart b/pkg/compiler/test/end_to_end/user_crash_test.dart index f6ee609e066..72c9e93c3f3 100644 --- a/pkg/compiler/test/end_to_end/user_crash_test.dart +++ b/pkg/compiler/test/end_to_end/user_crash_test.dart @@ -27,9 +27,9 @@ main() { expectedExceptions: [EXCEPTION], ); - var cantReadFile = diag.cantReadFile.withArgumentsOld( - entryPoint, - EXCEPTION, + var cantReadFile = diag.cantReadFile.withArguments( + uri: entryPoint, + details: EXCEPTION, ); List expectedLines = [ "Error: ${cantReadFile.problemMessage}",