reflect.Diagnostic
The stable structured diagnostic surfaced by reflection constructors and runtime compilation. `message` retains the historical flattened headline-plus-primary-label representation; use `headline` and `primary_label` when those parts must be inspected independently.
Signature
class reflect.DiagnosticThe stable structured diagnostic surfaced by reflection constructors and
runtime compilation. message retains the historical flattened
headline-plus-primary-label representation; use headline and
primary_label when those parts must be inspected independently.
Source:<builtin>/reflect/reflect.bamlbytes 2333–2902
Fields
code
stringspan
reflect.Span | nullmessage
stringseverity
"error" | "warning" | "info"Severity retained from the compiler diagnostic stream.
phase
"parse" | "hir" | "validation" | "type" | nullCompiler stage that emitted a source diagnostic. Runtime-generated
diagnostics which do not belong to a compiler stage report null.
headline
stringprimary_label
string | nullmessage_highlights
annotations
related_info
Implementations
reflect.AnyClass for T
Instance methods
The class declaration's schema metadata, or empty metadata when the runtime type is not a class.
Read a field as T. A missing field returns null; use has_field to
distinguish that case from a present field whose value is null.
Return a value-bound field handle, or null when no such field exists.
has_field
(self, name: string) -> bool throws neverWhether this value's runtime class declares a field called name.
false when the runtime type is not a class.
Reflected fields bound to this value for Field.value<T>().
name
(self) -> string throws neverThe rendered name of this value's concrete runtime type.
This value's concrete runtime type.
Source:<builtin>/reflect/reflect.bamlbytes 7609–7639