Source file test/fixedbugs/issue31777.go

     1  // compile
     2  
     3  // Copyright 2019 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  // Compile with static map literal.
     8  
     9  package p
    10  
    11  type i interface {
    12  	j()
    13  }
    14  
    15  type s struct{}
    16  
    17  func (s) j() {}
    18  
    19  type foo map[string]i
    20  
    21  var f = foo{
    22  	"1": s{},
    23  	"2": s{},
    24  }
    25  

View as plain text