Перейти к содержимому

(код без описания)

go · basicsPositive Technologiesне решено

(код без описания)

type Example struct{}
type MyInterface any
func example1() MyInterface {
var e *Example
return e
}
func example2() MyInterface { return nil }
func main() {
fmt.Println(example1())
fmt.Println(example2())
fmt.Println(example1() == example2()) // ?
}

Источник: Positive Technologies

← (код без описания) · Все задачи · Go · (код без описания) →