static class · System.Reflection
Fail
static class Fail
What the compiler's code calls when reflection meets what it cannot do.
- Tipo
- static class
- Espacio de nombres
- System.Reflection
- Ensamblado
- System.Core
- Acceso
- internal, static, abstract
- Archivo fuente
Reflection.ant
Herencia
- Clases base
-
AnyFail
Miembros privados e internos (5)
Miembros heredados (5)
GetTypemétodo de AnyUndescribedmétodo de AnyToStringmétodo de AnyHashmétodo de Anydestroymétodo de Any
Código fuente
Fail en Antril, descompilado a partir de su Larva HIR.
// System.Reflection.Fail — System.Core (decompiled from Larva HIR)
import System;
into namespace System.Reflection
{
/// What the compiler's code calls when reflection meets what it cannot do.
static class Fail
{
/// A field or result that is not an object (an array, a pointer, a function) cannot be an `any`.
[NoInline]
NotAnObject(str what) : any?
{
throw new NotSupportedError(what + " is not an object: reflection cannot give it as an any");
}
[NoInline]
Target(str type) : any
{
throw new InvalidCastError("the target is not a " + type);
}
[NoInline]
Value(str type) : any
{
throw new InvalidCastError("the value is not a " + type);
}
[NoInline]
ValueField(str field)
{
throw new NotSupportedError(field + " belongs to a value: set it on the value itself, not through a boxed copy");
}
[NoInline]
Missing(str what) : any?
{
throw new MissingMemberError(what);
}
}
}