diff options
Diffstat (limited to 'mk2rbc/variable.go')
-rw-r--r-- | mk2rbc/variable.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/mk2rbc/variable.go b/mk2rbc/variable.go index ded07fed6..6b67a7cb9 100644 --- a/mk2rbc/variable.go +++ b/mk2rbc/variable.go @@ -228,10 +228,9 @@ func (pv predefinedVariable) emitSet(gctx *generationContext, asgn *assignmentNo if actualValue == expectedValue { return } - gctx.writef("# MK2RBC TRANSLATION ERROR: cannot set predefined variable %s to %q, its value should be %q", - pv.name(), actualValue, expectedValue) - gctx.newLine() - gctx.write("pass") + gctx.emitConversionError(asgn.location, + fmt.Sprintf("cannot set predefined variable %s to %q, its value should be %q", + pv.name(), actualValue, expectedValue)) gctx.starScript.hasErrors = true return } |