Skip to content

Commit

Permalink
Fixed error messages.
Browse files Browse the repository at this point in the history
  • Loading branch information
markkurossi committed Sep 17, 2023
1 parent b985a27 commit d2116e1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions compiler/ast/builtin.go
Original file line number Diff line number Diff line change
Expand Up @@ -279,12 +279,12 @@ func nativeSSA(block *ssa.Block, ctx *Codegen, gen *ssa.Generator,

if len(args) < 1 {
return nil, nil, ctx.Errorf(loc,
"not enought argument in call to native")
"not enough arguments in call to native")
}
name, ok := args[0].ConstValue.(string)
if !args[0].Const || !ok {
return nil, nil, ctx.Errorf(loc,
"not enought argument in call to native")
"not enough arguments in call to native")
}
// Our native name constant is not needed in the implementation.
gen.RemoveConstant(args[0])
Expand Down Expand Up @@ -338,7 +338,7 @@ func nativeCircuit(name string, block *ssa.Block, ctx *Codegen,

if len(circ.Inputs) > len(args) {
return nil, nil, ctx.Errorf(loc,
"not enought argument in call to native")
"not enough arguments in call to native")
} else if len(circ.Inputs) < len(args) {
return nil, nil, ctx.Errorf(loc, "too many argument in call to native")
}
Expand Down

0 comments on commit d2116e1

Please sign in to comment.