repl: dont save line if last compilation errored

pull/1660/head
Henrixounez 2019-08-18 17:45:56 +02:00 committed by Alexander Medvednikov
parent f654c4af7a
commit aae063b9ad
2 changed files with 8 additions and 1 deletions

View File

@ -1375,7 +1375,9 @@ fn run_repl() []string {
s := os.exec('$vexe run $temp_file -repl') or {
panic(err)
}
if !s.exit_code {
lines << line
}
vals := s.output.split('\n')
for i:=0; i<vals.len; i++ {
println(vals[i])

View File

@ -0,0 +1,5 @@
a
33
===output===
.vrepl_temp.v:2 undefined: `a`
33