iter 22b.2.5: fix — move OverridingNonExistentMethod after UnboundConstraintTypeVar

This commit is contained in:
2026-05-09 18:01:51 +02:00
parent 634bd5eca3
commit 1f6d2322c3
+12 -12
View File
@@ -200,18 +200,6 @@ pub enum WorkspaceLoadError {
method: String,
},
/// Iter 22b.2: an instance specifies a body for a method name
/// that the corresponding class does not declare. Symmetric to
/// `MissingMethod` but in the opposite direction.
#[error(
"instance `{class} {type_repr}` provides body for method `{method}`, but class `{class}` does not declare it"
)]
OverridingNonExistentMethod {
class: String,
type_repr: String,
method: String,
},
/// Iter 22b.2: class-schema validation. The class parameter
/// appears in applied position (e.g. as the head of a
/// `Type::Con { name == param, args.len() > 0 }`) inside a method
@@ -256,6 +244,18 @@ pub enum WorkspaceLoadError {
constraint_class: String,
var: String,
},
/// Iter 22b.2: an instance specifies a body for a method name
/// that the corresponding class does not declare. Symmetric to
/// `MissingMethod` but in the opposite direction.
#[error(
"instance `{class} {type_repr}` provides body for method `{method}`, but class `{class}` does not declare it"
)]
OverridingNonExistentMethod {
class: String,
type_repr: String,
method: String,
},
}
/// Hash over the canonical bytes of a complete module.