1 // Copyright 2024 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 T1 C /* ERROR "C is not a type" */ 8 9 // TODO(gri) try to avoid this follow-on error 10 const C = T1(0 /* ERROR "cannot convert 0 (untyped int constant) to type T1" */) 11 12 type T2 V /* ERROR "V is not a type" */ 13 14 var V T2 15 16 func _() { 17 // don't produce errors here 18 _ = C + V 19 } 20