...

Source file src/internal/types/testdata/fixedbugs/issue3117.go

Documentation: internal/types/testdata/fixedbugs

     1  // Copyright 2023 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  package p
     6  
     7  type S struct {
     8  	a [1]int
     9  }
    10  
    11  func _(m map[int]S, key int) {
    12  	m /* ERROR "cannot assign to m[key].a[0] (neither addressable nor a map index expression)" */ [key].a[0] = 0
    13  }
    14  

View as plain text