Source file src/internal/types/testdata/fixedbugs/issue75885.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  type A[P any] = P // ERROR "cannot use type parameter declared in alias declaration as RHS"
     8  
     9  func _[P any]() {
    10  	type A[P any] = P // ERROR "cannot use type parameter declared in alias declaration as RHS"
    11  	type B = P
    12  	type C[Q any] = P
    13  }
    14  

View as plain text