Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion compiler/noirc_frontend/src/elaborator/expressions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ impl<'context> Elaborator<'context> {
(HirExpression::Error, Type::Error)
}
ExpressionKind::AsTraitPath(_) => {
self.push_err(ResolverError::UnquoteUsedOutsideQuote { span: expr.span });
self.push_err(ResolverError::AsTraitPathNotYetImplemented { span: expr.span });
(HirExpression::Error, Type::Error)
}
ExpressionKind::TypePath(path) => return self.elaborate_type_path(path),
Expand Down
9 changes: 9 additions & 0 deletions compiler/noirc_frontend/src/hir/resolution/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ pub enum ResolverError {
ArrayLengthInterpreter { error: InterpreterError },
#[error("The unquote operator '$' can only be used within a quote expression")]
UnquoteUsedOutsideQuote { span: Span },
#[error("\"as trait path\" not yet implemented")]
AsTraitPathNotYetImplemented { span: Span },
#[error("Invalid syntax in macro call")]
InvalidSyntaxInMacroCall { span: Span },
#[error("Macros must be comptime functions")]
Expand Down Expand Up @@ -548,6 +550,13 @@ impl<'a> From<&'a ResolverError> for Diagnostic {
*span,
)
},
ResolverError::AsTraitPathNotYetImplemented { span } => {
Diagnostic::simple_error(
"\"as trait path\" not yet implemented".into(),
"".into(),
*span,
)
},
ResolverError::InvalidSyntaxInMacroCall { span } => {
Diagnostic::simple_error(
"Invalid syntax in macro call".into(),
Expand Down