Source file src/internal/types/testdata/fixedbugs/issue71131.go

     1  // Copyright 2025 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  func _() {
     8  	type Bool bool
     9  	for range func /* ERROR "yield func returns user-defined boolean, not bool" */ (func() Bool) {} {
    10  	}
    11  	for range func /* ERROR "yield func returns user-defined boolean, not bool" */ (func(int) Bool) {} {
    12  	}
    13  	for range func /* ERROR "yield func returns user-defined boolean, not bool" */ (func(int, string) Bool) {} {
    14  	}
    15  }
    16  

View as plain text