iter 22b.4a.3.fix: drop unused InstanceMethod import + indent stub + dedup test imports
This commit is contained in:
@@ -8,9 +8,8 @@
|
||||
//! per level. Comments are NOT emitted.
|
||||
|
||||
use ailang_core::ast::{
|
||||
Arm, ClassDef, ClassMethod, ConstDef, Ctor, Def, FnDef, Import, InstanceDef,
|
||||
InstanceMethod, Literal, Module, ParamMode, Pattern, SuperclassRef, Suppress, Term,
|
||||
Type, TypeDef,
|
||||
Arm, ClassDef, ClassMethod, ConstDef, Ctor, Def, FnDef, Import, InstanceDef, Literal,
|
||||
Module, ParamMode, Pattern, SuperclassRef, Suppress, Term, Type, TypeDef,
|
||||
};
|
||||
|
||||
/// Print a module in form (A).
|
||||
@@ -275,11 +274,8 @@ fn write_class_method(out: &mut String, m: &ClassMethod, level: usize) {
|
||||
out.push(')');
|
||||
}
|
||||
|
||||
fn write_instance_def(out: &mut String, _i: &InstanceDef, _level: usize) {
|
||||
// Task 4: real implementation. This stub keeps the workspace
|
||||
// compiling; it intentionally produces an empty form so that
|
||||
// any test that exercises Instance round-trip will fail
|
||||
// (which it should — Task 4 is RED for instance-side).
|
||||
fn write_instance_def(out: &mut String, _i: &InstanceDef, level: usize) {
|
||||
indent(out, level);
|
||||
out.push_str("(instance)");
|
||||
}
|
||||
|
||||
@@ -552,11 +548,6 @@ fn write_pattern(out: &mut String, p: &Pattern) {
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
#[allow(unused_imports)]
|
||||
use ailang_core::ast::{
|
||||
ClassDef, ClassMethod, Def, InstanceDef, InstanceMethod, Literal, Module,
|
||||
ParamMode, SuperclassRef, Term, Type,
|
||||
};
|
||||
|
||||
fn round_trip(m: Module, label: &str) {
|
||||
let printed = print(&m);
|
||||
|
||||
Reference in New Issue
Block a user