RF0203: Signal delegate must return void
The signal delegate declares a DateTime return value. A signal notifies subscribers; its contract should return void.
For a C# project using Reckfell.NET.Sdk 1.0.0. Fix the first build error first: later messages may be a consequence.
Cause
The signal delegate declares a DateTime return value. A signal notifies subscribers; its contract should return void.
Fix
Change the return type to void. For a response, use a separate method with a result and an explicit caller.
Failing example
Save the file in a test C# project and run dotnet build. This version intentionally fails to build.
Example.cs
using Reckfell;
namespace DiagnosticExamples.RF0203;
public partial class Example : Entity { [Signal] public delegate System.DateTime ChangedEventHandler(int value); }Expected messages: RF0203.
Working version
Replace the failing version with these files; do not keep both declarations in the project.
Example.cs
using Reckfell;
namespace DiagnosticExamples.RF0203;
public partial class Example : Entity
{
[Signal] public delegate void ChangedEventHandler(int value);
public void Publish() => EmitSignal(SignalName.Changed, 7);
}Result
Publish() notifies Changed and delivers 7. The delegate has no return value.
In SDK 1.0.0 the signature check currently accepts some supported return types, such as bool. Successful compilation does not make the returned value part of the signal contract. Declare signals with void; the failing example uses DateTime to reproduce RF0203 specifically.