...

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

Documentation: internal/types/testdata/fixedbugs

     1  // -lang=go1.19
     2  
     3  // Copyright 2023 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  //go:build go1.20
     8  
     9  package p
    10  
    11  type I[P any] interface {
    12  	~string | ~int
    13  	Error() P
    14  }
    15  
    16  func _[P I[string]]() {
    17  	var x P
    18  	var _ error = x
    19  }
    20  

View as plain text