github.com/go-asm/go@v1.21.1-0.20240213172139-40c5ead50c48/cmd/link/ld/testdata/deadcode/typedesc.go (about) 1 // Copyright 2020 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 // Test that a live variable doesn't bring its type 6 // descriptor live. 7 8 package main 9 10 type T [10]string 11 12 var t T 13 14 func main() { 15 println(t[8]) 16 }