The change in typexpr.go matches types2 behavior.
For #54511.
Change-Id: I79c922a94f2ee0440c1814140935c321439c7d25
Reviewed-on: https://go-review.googlesource.com/c/go/+/425714
Reviewed-by: Robert Griesemer <gri@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Robert Griesemer <gri@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
Reviewed-by: Alan Donovan <adonovan@google.com>
}
func make2() {
- f1 /* ERROR not used */ := func() (x []int) { return }
+ f1 := func() (x []int) { return }
_ = make(f0 /* ERROR not a type */ ())
_ = make(f1 /* ERROR not a type */ ())
}
}
func new2() {
- f1 /* ERROR not used */ := func() (x []int) { return }
+ f1 := func() (x []int) { return }
_ = new(f0 /* ERROR not a type */ ())
_ = new(f1 /* ERROR not a type */ ())
}
default:
check.errorf(e0, _NotAType, "%s is not a type", e0)
+ check.use(e0)
}
typ := Typ[Invalid]