Source file src/internal/types/testdata/fixedbugs/issue48827.go
1 // Copyright 2021 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 package p 6 7 type G[P any] int 8 9 type ( 10 _ G[int] 11 _ G[G /* ERRORx `cannot use.*without instantiation` */] 12 _ bool /* ERROR "invalid operation: bool[int] (bool is not a generic type)" */ [int] 13 _ bool /* ERROR "invalid operation: bool[G] (bool is not a generic type)" */[G] 14 ) 15 16 // The example from the issue. 17 func _() { 18 _ = &([10]bool /* ERRORx `invalid operation.*bool is not a generic type` */ [1 /* ERROR "expected type" */ ]{}) 19 } 20