Source file test/fixedbugs/issue55889.go
1 // errorcheck -0 -lang=go1.17 2 3 // Copyright 2022 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 // Prior to Go 1.18, ineffectual //go:linkname directives were treated 8 // as noops. Ensure that modules that contain these directives (e.g., 9 // x/sys prior to go.dev/cl/274573) continue to compile. 10 11 package p 12 13 import _ "unsafe" 14 15 //go:linkname nonexistent nonexistent 16 17 //go:linkname constant constant 18 const constant = 42 19 20 //go:linkname typename typename 21 type typename int 22