From d77a4dd8c3aeda7ed0ef56debf3c75f443cb87ba Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Wed, 4 Sep 2024 11:56:11 +0200 Subject: [PATCH] [bgen] Add warning to the list of exceptions instead of showing it right away. (#21027) This way execution won't stop if the warning was turned into an error, and we'll get a list of all the warnings by executing once, instead of having to re-execute after fixing each warning. --- src/bgen/Generator.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bgen/Generator.cs b/src/bgen/Generator.cs index 85db12aec7c2..8c97f6c1fcf5 100644 --- a/src/bgen/Generator.cs +++ b/src/bgen/Generator.cs @@ -4563,8 +4563,8 @@ void GenerateMethod (MemberInformation minfo) argCount++; } if (minfo.Method.GetParameters ().Length != argCount) { - ErrorHelper.Warning (1105, - minfo.selector, argCount, minfo.Method, minfo.Method.GetParameters ().Length); + exceptions.Add (ErrorHelper.CreateWarning (1105, + minfo.selector, argCount, minfo.Method, minfo.Method.GetParameters ().Length)); } }