Unary operators
User-defined unary operators participate in normal overload/type resolution across classes and structs, with conversions, generics, nullable interaction where applicable, and focused diagnostics.
VOID Language operators
VOID completes user-defined unary and binary operators through its normal overload/conversion machinery, then carries those contracts into static interfaces and constrained generic code that specializes to ordinary concrete operations.
Completed operator foundation
Concrete operator declarations, static-interface requirements, constrained generic dispatch, compound targets, nullable/value interaction, and iterator lowering all reuse existing semantic binding. The compiler does not introduce a runtime generic operator dispatcher.
User-defined unary operators participate in normal overload/type resolution across classes and structs, with conversions, generics, nullable interaction where applicable, and focused diagnostics.
User-defined arithmetic, comparison, equality, and relevant compound-operation paths share normal conversion ranking and overload resolution instead of separate operator-specific rules.
Interfaces can require supported static operators. Implementing types are validated through the same static-interface contract system used by other static members.
A generic method constrained by an operator-bearing interface can use that operator through T. Monomorphization resolves the operation to the concrete implementation.
When constrained generic locals are promoted into iterator state-machine fields, VOID preserves their generic origin and constraint metadata so operator legality survives suspension and resume.
User-facing diagnostics describe the language rule or invalid construct itself rather than exposing historical internal milestone labels.
Semantic ownership
Static-interface operator constraints authorize the operation in generic source. Specialization then lowers that already-valid operation to the concrete operator. Iterator and closure transformations preserve the semantic provenance instead of asking later stages to rediscover why the operation was legal.
public static IEnumerable<T> Accumulate<T>(T sum, T other)
where T : IAdd<T>
{
yield return sum;
sum += other;
yield return sum;
}public interface IAdd<T>
{
static T operator +(T left, T right);
}
public static T Add<T>(T left, T right)
where T : IAdd<T>
{
return left + right;
}public struct Int2
{
public int X;
public int Y;
public static Int2 operator +(Int2 left, Int2 right)
{
return new Int2 { X = left.X + right.X, Y = left.Y + right.Y };
}
public static Int2 operator -(Int2 value)
{
return new Int2 { X = -value.X, Y = -value.Y };
}
}