Source file test/fixedbugs/issue24159.go

     1  // errorcheck
     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  package p
     8  
     9  type intAlias = int
    10  
    11  func f() {
    12  	switch interface{}(nil) {
    13  	case uint8(0):
    14  	case byte(0): // ERROR "duplicate case"
    15  	case int32(0):
    16  	case rune(0): // ERROR "duplicate case"
    17  	case int(0):
    18  	case intAlias(0): // ERROR "duplicate case"
    19  	}
    20  }
    21  

View as plain text