Vixen
02b45cc4
csharp
public static class Conversions

Type-level conversion rules. The binder layers the expression-aware case on top (a constant literal that fits the target); everything decidable from the two types alone lives here.

No guide page documents this yet — the page shows what the code says about itself.

Methods (3)

  • public static Conversion Classify(TypeSymbol source, TypeSymbol target)

    Classifies the conversion from to .

  • public static bool HasImplicitConversion(TypeSymbol source, TypeSymbol target)

    True when a value of may be used where is expected.

  • public static TypeSymbol? FindCommonType(TypeSymbol left, TypeSymbol right)

    The type both operands of a binary operator are converted to, or null if there is no such type. Vectors win over the scalars they mix with, so float3 * 2 yields float3.

Used by (2)

  • BinderVixen.Raven
  • TypeSystemTestsVixen.Raven.Tests