1
0
mirror of https://github.com/golang/go synced 2024-11-25 06:47:56 -07:00
go/test/fixedbugs/issue68292.go
Tim King 0253c0f4ac cmd/compile/internal/types2: change inference error message
Changes the type inference error message so that the position is
proceeded by a space. cmd/go rewrites the output of gc to replace
absolute paths at the beginning of lines and those proceeded by a
space or a tab to relative paths.

Updates testdir to do the same post processing on the output
of tests as cmd/go.

Fixes #68292

Change-Id: Ie109b51143e68f6e7ab4cd19064110db0e609a7e
Reviewed-on: https://go-review.googlesource.com/c/go/+/603097
Reviewed-by: Robert Findley <rfindley@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2024-08-13 17:25:36 +00:00

13 lines
309 B
Go

// errorcheck
// Copyright 2024 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
func f[S any, T any](T) {}
func g() {
f(0) // ERROR "in call to f, cannot infer S \(declared at issue68292.go:9:8\)"
}