Standard conversions
Identity, numeric, enum, reference/interface, null, nullable, and existing pointer/unsafe conversions use one semantic classification vocabulary and ranking model.
VOID Language conversions
VOID now classifies, selects, and preserves conversions through one compiler-owned semantic model. Standard conversions, user-defined operators, nullable lifting, target typing, static-interface contracts, constrained generic dispatch, iterators, closures, and GC all share the same source of truth.
Completed conversion semantics
Semantic analysis classifies the source and target types, selects the applicable standard or user-defined conversion, records why the conversion is legal, and hands that binding forward. Later lowering and code generation consume that decision instead of trying to rediscover it.
Identity, numeric, enum, reference/interface, null, nullable, and existing pointer/unsafe conversions use one semantic classification vocabulary and ranking model.
implicit and explicit conversion operators participate in applicability, accessibility, ambiguity, and surrounding standard-conversion rules through the shared resolver.
User-defined value conversions lift through nullable values with normal null propagation, legal explicit extraction, and focused ambiguity/invalid-conversion diagnostics.
Assignments, locals, fields, properties, parameters, returns, constructors, arrays, initializers, params, conditionals, and switch expressions all ask the same conversion engine.
Interfaces can require signature-only implicit or explicit conversions. Implementing types are validated through existing static-interface inheritance, conflict, accessibility, and specialization rules.
Generic implicit or explicit conversions are legal only when the generic constraints authorize the required conversion. Monomorphization then resolves the already-proven operation to the concrete implementation.
Generic method inference, overload resolution, target typing, specialized fields/properties, and transformed expressions preserve the conversion contract that made the source code valid.
Conversion provenance survives captured locals and iterator promotion across yield, forced GC, exceptions, finally, deterministic disposal, and managed conversion results.
Ambiguous, inaccessible, unsupported, and unconstrained conversions are rejected at the semantic site with user-facing diagnostics rather than leaking lowering details.
Semantic authority
A specialized type may happen to provide a conversion, but generic source can use that conversion only when its constraints prove it. VOID carries that proof through specialization, iterator/closure transformation, and lowering so code generation never widens the language after semantic analysis.
public struct Meters
{
public int Value;
public static implicit operator Meters(int value)
{
return new Meters { Value = value };
}
public static explicit operator int(Meters value)
{
return value.Value;
}
}
Meters distance = 12;
int raw = (int)distance;public interface IFromInt<T>
{
static implicit operator T(int value);
}
public static T Convert<T>(int value)
where T : IFromInt<T>
{
return value;
}int? source = 12;
Meters? converted = source;
source = null;
converted = source; // remains empty