Skip to content

"var re, im = complexSqrt(-1)" is not accepted by 8g #188

Closed
@gopherbot

Description

@gopherbot

by [email protected]:

According to http://golang.org/doc/go_spec.html#Variable_declarations the
following code is valid:

  func complexSqrt(i int) (int, int) {return 0, 1}
  var re, im = complexSqrt(-1)

However, 8c generates the following error when I compile it

  multiple-value complexSqrt() in single-value context

Not clear if it's the docs or the compiler that's in error.


GOARCH=386
GOOS=linux


$ hg id
b51fd2d6c160 release/release.2009-11-10.1

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions