]> Cypherpunks.ru repositories - gostls13.git/blob - src/go/types/alias.go
7dc7fe9e590d06e02199e5fe3b457c6d4067a5a9
[gostls13.git] / src / go / types / alias.go
1 // Code generated by "go test -run=Generate -write=all"; DO NOT EDIT.
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 package types
8
9 // This file will eventually define an Alias type.
10 // For now it declares asNamed. Once Alias types
11 // exist, asNamed will need to indirect through
12 // them as needed.
13
14 // asNamed returns t as *Named if that is t's
15 // actual type. It returns nil otherwise.
16 func asNamed(t Type) *Named {
17         n, _ := t.(*Named)
18         return n
19 }