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

     1  // -lang=go1.26
     2  
     3  // Copyright 2026 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  package p
     8  
     9  type Foo struct {
    10  	Bar
    11  }
    12  
    13  type Bar struct {
    14  	Baz int
    15  }
    16  
    17  var _ = Foo{Baz /* ERROR "use of promoted field Bar.Baz in struct literal of type Foo requires go1.27 or later" */ : 1}
    18  

View as plain text