...

Source file src/cmd/link/internal/ld/testdata/deadcode/typedesc.go

Documentation: cmd/link/internal/ld/testdata/deadcode

     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  }
    17  

View as plain text