Source file src/internal/types/testdata/check/go1_xx_19.go

     1  // Copyright 2022 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  // Check Go language version-specific errors.
     6  
     7  //go:build go1.19
     8  
     9  package p
    10  
    11  type Slice []byte
    12  type Array [8]byte
    13  
    14  var s Slice
    15  var p = (Array)(s /* ok because Go 1.X prior to Go 1.21 ignored the //go:build go1.19 */)
    16  

View as plain text