1// errorcheck -lang=go1.16 2 3// Copyright 2021 The Go Authors. All rights reserved. Use of this 4// source code is governed by a BSD-style license that can be found in 5// the LICENSE file. 6 7package p 8 9import "unsafe" 10 11func main() { 12 _ = unsafe.Add(unsafe.Pointer(nil), 0) // ERROR "unsafe.Add requires go1.17 or later" 13 _ = unsafe.Slice(new(byte), 1) // ERROR "unsafe.Slice requires go1.17 or later" 14} 15