Source file src/internal/types/testdata/check/go1_25.go
1 // -lang=go1.25 2 3 // Copyright 2025 The Go Authors. All rights reserved. 4 // Use of this source code is governed by a BSD-style 5 // license that can be found in the LICENSE file. 6 7 // Check Go language version-specific errors. 8 9 //go:build go1.25 10 11 package p 12 13 func f(x int) { 14 _ = new /* ERROR "new(123) requires go1.26 or later" */ (123) 15 _ = new /* ERROR "new(x) requires go1.26 or later" */ (x) 16 _ = new /* ERROR "new(f) requires go1.26 or later" */ (f) 17 _ = new /* ERROR "new(1 < 2) requires go1.26 or later" */ (1 < 2) 18 } 19