Debian Codegraph @

go/ssa/interp/testdata/newexpr_go126.go

raw symbols SCIP
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 //go:build go1.26
6
7 package main
8
9 func main() {
10 // Test new(expr), introduced in go1.26.
11 var ptr *int = new(123)
12 if *ptr != 123 {
13 panic("wrong value")
14 }
15 }