Skip to content

Commit

Permalink
Go, Rust: Fix usage of incorrect stream in repeat: eos loops when `…
Browse files Browse the repository at this point in the history
…_io` is redefined
  • Loading branch information
Mingun committed Sep 15, 2024
1 parent b8c280e commit 53fa661
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ class GoCompiler(typeProvider: ClassTypeProvider, config: RuntimeConfig)
out.inc

val eofVar = translator.allocateLocalVar()
out.puts(s"${translator.localVarName(eofVar)}, err := this._io.EOF()")
out.puts(s"${translator.localVarName(eofVar)}, err := $io.EOF()")
translator.outAddErrCheck()
out.puts(s"if ${translator.localVarName(eofVar)} {")
out.inc
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ class RustCompiler(typeProvider: ClassTypeProvider, config: RuntimeConfig)
out.puts("{")
out.inc
out.puts(s"let mut _i = 0;")
out.puts(s"while !_io.is_eof() {")
out.puts(s"while !$io.is_eof() {")
out.inc
}

Expand Down

0 comments on commit 53fa661

Please sign in to comment.