The following code fails to build on Linux (couldn't reproduce on Windows) :
public struct FooBar
{
public const Self Const = .(); // Has to be const
public static Bar operator+(Self a, Object b) // Has to be an operator that returns Bar
{
return default; // Return value not relevant
}
}
public struct Foo
{
protected float[1] e; // Has to be fixed size array (size not relevant) of float or double
}
public struct Bar : Foo // Has to be derived
{
}
public class Program
{
public static void Main()
{
Bar required = .(); // Has to be a new Bar instance
let error = (FooBar.Const + null); // Has to involve at least one const FooBar (other value not relevant)
}
}
With the following error :
Function return type does not match operand type of return inst!
ret float %2, !dbg !37
i32
Inspecting the IR shows that the operator is incorrectly marked has returning i32 rather than float here
define i32 @_ZN2bf8TestZone6FooBarplES1_PNS_6System6ObjectE(ptr %b) #0 !dbg !4 {
Tested on latest nightly (03/27/2026)
The following code fails to build on Linux (couldn't reproduce on Windows) :
With the following error :
Inspecting the IR shows that the operator is incorrectly marked has returning i32 rather than float here
Tested on latest nightly (03/27/2026)