Source file test/fixedbugs/issue5698.go

     1  // errorcheck
     2  
     3  // Copyright 2013 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  // Issue 5698: can define a key type with slices.
     8  
     9  package main
    10  
    11  type Key struct {
    12  	a int16 // the compiler was confused by the padding.
    13  	b []int
    14  }
    15  
    16  type Val struct{}
    17  
    18  type Map map[Key]Val // ERROR "invalid map key type"
    19  

View as plain text