go todos 源码

  • 2022-07-15
  • 浏览 (901)

golang todos 代码

文件路径:/src/go/types/testdata/check/todos.go

// Copyright 2020 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

// This file is meant as "dumping ground" for tests
// of not yet implemented features. It will grow and
// shrink over time.

package p

// When using []'s instead of ()'s for type parameters
// we don't need extra parentheses for some composite
// literal types.
type T1[P any] struct{}
type T2[P, Q any] struct{}

func _() {
   _ = []T1[int]{}            // ok if we use []'s
   _ = [](T1[int]){}
   _ = []T2[int, string]{}    // ok if we use []'s
   _ = [](T2[int, string]){}
}

相关信息

go 源码目录

相关文章

go blank 源码

go builtins0 源码

go builtins1 源码

go chans 源码

go compliterals 源码

go const0 源码

go const1 源码

go constdecl 源码

go conversions0 源码

go conversions1 源码

0  赞