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 11package p 12 13import _ "unsafe" 14 15//go:linkname nonexistent nonexistent 16 17//go:linkname constant constant 18const constant = 42 19 20//go:linkname typename typename 21type typename int 22