Skip to content

Commit

Permalink
Go: fix _index in repeat: eos to start from 0 (not 1)
Browse files Browse the repository at this point in the history
Fixes the following tests for Go:

* ValidFailRepeatAnyofInt
* ValidFailRepeatContents
* ValidFailRepeatEqInt
* ValidFailRepeatExpr
* ValidFailRepeatInst
* ValidFailRepeatMaxInt
* ValidFailRepeatMinInt
  • Loading branch information
generalmimon committed Jul 16, 2024
1 parent 7154301 commit 54524e1
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ class GoCompiler(typeProvider: ClassTypeProvider, config: RuntimeConfig)
}

override def condRepeatEosHeader(id: Identifier, io: String, dataType: DataType): Unit = {
out.puts(s"for i := 1;; i++ {")
out.puts(s"for i := 0;; i++ {")
out.inc

val eofVar = translator.allocateLocalVar()
Expand Down

0 comments on commit 54524e1

Please sign in to comment.