Named function return supported?


#1

Hi,

If I name the return like this…

func rhoPi(blk State) (blkOut State) {
.
.
.
	return
}

reco check throws the following error:

error[E012]: a function was called with the wrong number of arguments: expected 1, got 0

If I change the code to this:

func rhoPi(blk State)  State {
.
.
.
	return blkOut
}

…it appears to work OK.


#2

Hi Mark,

We do not support named return variables like your first example. Our next major release will have much better frontend compatibility with the standard Go, and will fix this issue.

Josh