...
Run Format

Source file test/fixedbugs/bug168.go

Documentation: test/fixedbugs

     1  // run
     2  
     3  // Copyright 2009 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  package main
     8  
     9  var g byte = 123
    10  var f *byte = &g
    11  var b = make([]byte, 5)
    12  
    13  func main() {
    14  	b[0:1][0] = *f
    15  	if b[0] != 123 {
    16  		println("want 123 got", b[0])
    17  		panic("fail")
    18  	}
    19  }
    20  

View as plain text