Source file test/fixedbugs/issue26340.go

     1  // compile
     2  
     3  // Copyright 2018 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  // gccgo did not permit omitting the type of a composite literal
     8  // element when one of the middle omitted types was a pointer type.
     9  
    10  package p
    11  
    12  type S []T
    13  type T struct { x int }
    14  
    15  var _ = map[string]*S{
    16  	"a": {
    17  		{ 1 },
    18  	},
    19  }
    20  
    21  var _ = [1]*S{ { {1}, } }
    22  

View as plain text