github.com/go-asm/go@v1.21.1-0.20240213172139-40c5ead50c48/types/testdata/fixedbugs/issue60434.go (about) 1 // Copyright 2023 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 // Test that there are no type inference errors 6 // if function arguments are invalid. 7 8 package p 9 10 func f[S any](S) {} 11 12 var s struct{ x int } 13 14 func _() { 15 f(s.y /* ERROR "s.y undefined" */) 16 f(1 /* ERROR "cannot convert 1" */ / s) 17 }