ufm: (Default)
[personal profile] ufm

func tt() (int, int) {
return 1,2
}

func cc(a...interface{}) {
for p, x := range a {
fmt.Printf("%d %#v \n", p, x)
}
return
}

Если написать так:
cc(tt()) — то всё нормально, оно скомпилируется и выведет две строчки.

А если вот так:

cc(1,tt()) — то оно даже не скомпилируется, с диагностикой multiple-value tt() in single-value context

Ну девочка, ну ёб твою мать.

Originally published at U.F.M's Homepage. You can comment here or there.

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting