static class · System.Reflection

Fail

static class Fail

What the compiler's code calls when reflection meets what it cannot do.

Kind
static class
Namespace
System.Reflection
Assembly
System.Core
Access
internal, static, abstract
Source file
Reflection.ant

Inheritance

Base classes
Any Fail

Private and internal members (5)

NotAnObject(str what) : any?
#

private static

A field or result that is not an object (an array, a pointer, a function) cannot be an any.

Target(str type) : any
#

private static

Value(str type) : any
#

private static

ValueField(str field)
#

private static

Missing(str what) : any?
#

private static

Inherited members (5)

Source

Fail as Antril, decompiled from its Larva HIR.

System.Reflection.Fail.ant
// 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);
		}
	}
}
Esc