From 2491cbc26aa61c5bbb792d5a6d3c842e1680b0a7 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Tue, 13 Aug 2024 15:03:13 +0200 Subject: [PATCH] [bgen] Add warning to the list of exceptions instead of showing it right away. 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 f84a55cddf2f..970b2de6af84 100644 --- a/src/bgen/Generator.cs +++ b/src/bgen/Generator.cs @@ -4535,8 +4535,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)); } }