main.mx raw

   1  package main
   2  
   3  // A named result needs parentheses. Without them the parser used to recover by
   4  // swallowing the body, so this function's local `n` landed at package scope and
   5  // the only complaint was "unnamed return values" - for a signature that names
   6  // one. It must fail with the syntax error instead.
   7  func counter() n int32 {
   8  	n = 41
   9  	return
  10  }
  11  
  12  func main() {
  13  	println(counter())
  14  }
  15