Source file test/typeparam/issue48537.go

     1  // compile
     2  
     3  // Copyright 2021 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  func main() {
    10  }
    11  
    12  type C interface {
    13  	map[int]string
    14  }
    15  
    16  func f[A C]() A {
    17  	return A{
    18  		1: "a",
    19  		2: "b",
    20  	}
    21  }
    22  

View as plain text