pub struct TypeCheckResult {
pub types: HashMap<String, Type>,
pub semantic_types: HashMap<String, SemanticType>,
pub warnings: Vec<TypeWarning>,
}Expand description
Result of type checking
Fields§
§types: HashMap<String, Type>Inferred types for all declarations (inference-level types)
semantic_types: HashMap<String, SemanticType>Semantic types for all declarations (user-facing types)
warnings: Vec<TypeWarning>Type warnings (non-fatal issues)
Implementations§
Source§impl TypeCheckResult
impl TypeCheckResult
Sourcepub fn get_semantic_type(&self, name: &str) -> Option<&SemanticType>
pub fn get_semantic_type(&self, name: &str) -> Option<&SemanticType>
Get the semantic type for a declaration
Sourcepub fn fallible_functions(&self) -> Vec<&str>
pub fn fallible_functions(&self) -> Vec<&str>
Get all function declarations that are fallible (return Result)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TypeCheckResult
impl RefUnwindSafe for TypeCheckResult
impl Send for TypeCheckResult
impl Sync for TypeCheckResult
impl Unpin for TypeCheckResult
impl UnsafeUnpin for TypeCheckResult
impl UnwindSafe for TypeCheckResult
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more