| // Copyright 2021 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. |
| const iexportVersion = iexportVersionGenerics |
| // additionalPredeclared returns additional predeclared types in go.1.18. |
| func additionalPredeclared() []types.Type { |
| types.Universe.Lookup("comparable").Type(), |
| types.Universe.Lookup("any").Type(), |
| // See cmd/compile/internal/types.SplitVargenSuffix. |
| func splitVargenSuffix(name string) (base, suffix string) { |
| for i > 0 && name[i-1] >= '0' && name[i-1] <= '9' { |
| if i >= len(dot) && name[i-len(dot):i] == dot { |
| return name[:i], name[i:] |