Implement assert casting

This commit is contained in:
Shunsuke Shibayama 2022-10-09 00:14:50 +09:00
parent 4e70e2e980
commit de1180387c
13 changed files with 252 additions and 51 deletions

View file

@ -1129,7 +1129,7 @@ impl CodeGenerator {
CompileError::feature_error(
self.cfg.input.clone(),
unary.op.loc(),
"",
&unary.op.inspect().clone(),
AtomicStr::from(unary.op.content),
)
.write_to_stderr();
@ -1177,7 +1177,7 @@ impl CodeGenerator {
CompileError::feature_error(
self.cfg.input.clone(),
bin.op.loc(),
"",
&bin.op.inspect().clone(),
AtomicStr::from(bin.op.content),
)
.write_to_stderr();
@ -1739,7 +1739,7 @@ impl CodeGenerator {
}
// Dict,
other => {
CompileError::feature_error(self.cfg.input.clone(), other.loc(), "???", "".into())
CompileError::feature_error(self.cfg.input.clone(), other.loc(), "Dict", "".into())
.write_to_stderr();
self.crash("cannot compile this expression at this time");
}