Validate method substitution before definition updates and execution
This commit is contained in:
@@ -18,6 +18,11 @@ pub enum VmError {
|
||||
method: String,
|
||||
reason: &'static str,
|
||||
},
|
||||
OverrideViolation {
|
||||
definition: String,
|
||||
method: String,
|
||||
reason: &'static str,
|
||||
},
|
||||
UnknownAnnotation(String),
|
||||
TypeMismatch {
|
||||
function: String,
|
||||
@@ -63,6 +68,11 @@ impl fmt::Display for VmError {
|
||||
Self::UnknownAnnotation(name) => {
|
||||
write!(f, "unknown or invalid type annotation: {name}")
|
||||
}
|
||||
Self::OverrideViolation {
|
||||
definition,
|
||||
method,
|
||||
reason,
|
||||
} => write!(f, "override {definition}.{method}: {reason}"),
|
||||
Self::TypeMismatch {
|
||||
function,
|
||||
position,
|
||||
|
||||
Reference in New Issue
Block a user