Skip to content

Error message when writing (incorrectly) "var x : int = y".  #112

@Dom-Skinner

Description

@Dom-Skinner

The simple code:

fun comp f() {
  var y : int = 0;
  x <-take;
  emit (x+1)
}

let comp main = read >>> f()  >>> write

fails to compile with the error message

EXTRAOPTS='' ../../scripts/preprocesscompile-vs.sh test.zir test.out
test.zir
test.zir:3:15:
    expected 'in' but got `='
Makefile:45: recipe for target 'test.out' failed
make: *** [test.out] Error 1

as var y : int = 0; should be var y : int := 0;

Shouldn't the error message have been something like:
expected ':= or ;' but got '=' rather than expected 'in' but got '='

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions