...

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

Documentation: internal/types/testdata/fixedbugs

     1  // Copyright 2022 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  var _ = (*interface /* ERROR "interface contains type constraints" */ {int})(nil)
     8  
     9  // abbreviated test case from issue
    10  
    11  type TypeSet interface{ int | string }
    12  
    13  func _() {
    14  	f((*TypeSet /* ERROR "interface contains type constraints" */)(nil))
    15  }
    16  
    17  func f(any) {}

View as plain text