Source file test/fixedbugs/issue53635.go
1 // run 2 3 // Copyright 2022 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 f[int]() 11 } 12 13 func f[T any]() { 14 switch []T(nil) { 15 case nil: 16 default: 17 panic("FAIL") 18 } 19 20 switch (func() T)(nil) { 21 case nil: 22 default: 23 panic("FAIL") 24 } 25 26 switch (map[int]T)(nil) { 27 case nil: 28 default: 29 panic("FAIL") 30 } 31 } 32