mirror of
				https://github.com/k3s-io/kubernetes.git
				synced 2025-11-03 23:40:03 +00:00 
			
		
		
		
	Bump cel-go to v0.12.1
This commit is contained in:
		
							
								
								
									
										8
									
								
								vendor/github.com/google/cel-go/cel/decls.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										8
									
								
								vendor/github.com/google/cel-go/cel/decls.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -165,7 +165,7 @@ type Type struct {
 | 
			
		||||
	isAssignableRuntimeType func(other ref.Type) bool
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// IsAssignableFrom determines whether the current type is type-check assignable from the input fromType.
 | 
			
		||||
// IsAssignableType determines whether the current type is type-check assignable from the input fromType.
 | 
			
		||||
func (t *Type) IsAssignableType(fromType *Type) bool {
 | 
			
		||||
	if t.isAssignableType != nil {
 | 
			
		||||
		return t.isAssignableType(fromType)
 | 
			
		||||
@@ -650,7 +650,7 @@ func (f *functionDecl) merge(other *functionDecl) (*functionDecl, error) {
 | 
			
		||||
	for _, o := range other.overloads {
 | 
			
		||||
		err := merged.addOverload(o)
 | 
			
		||||
		if err != nil {
 | 
			
		||||
			return nil, fmt.Errorf("function declration merge failed: %v", err)
 | 
			
		||||
			return nil, fmt.Errorf("function declaration merge failed: %v", err)
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
	if other.singleton != nil {
 | 
			
		||||
@@ -821,8 +821,8 @@ func (o *overloadDecl) signatureOverlaps(other *overloadDecl) bool {
 | 
			
		||||
	for i, argType := range o.argTypes {
 | 
			
		||||
		otherArgType := other.argTypes[i]
 | 
			
		||||
		argsOverlap = argsOverlap &&
 | 
			
		||||
			(argType.IsAssignableRuntimeType(otherArgType.runtimeType) ||
 | 
			
		||||
				otherArgType.IsAssignableRuntimeType(argType.runtimeType))
 | 
			
		||||
			(argType.IsAssignableType(otherArgType) ||
 | 
			
		||||
				otherArgType.IsAssignableType(argType))
 | 
			
		||||
	}
 | 
			
		||||
	return argsOverlap
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										4
									
								
								vendor/github.com/google/cel-go/cel/env.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								vendor/github.com/google/cel-go/cel/env.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -61,6 +61,8 @@ func (ast *Ast) SourceInfo() *exprpb.SourceInfo {
 | 
			
		||||
 | 
			
		||||
// ResultType returns the output type of the expression if the Ast has been type-checked, else
 | 
			
		||||
// returns decls.Dyn as the parse step cannot infer the type.
 | 
			
		||||
//
 | 
			
		||||
// Deprecated: use OutputType
 | 
			
		||||
func (ast *Ast) ResultType() *exprpb.Type {
 | 
			
		||||
	if !ast.IsChecked() {
 | 
			
		||||
		return decls.Dyn
 | 
			
		||||
@@ -68,6 +70,8 @@ func (ast *Ast) ResultType() *exprpb.Type {
 | 
			
		||||
	return ast.typeMap[ast.expr.GetId()]
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// OutputType returns the output type of the expression if the Ast has been type-checked, else
 | 
			
		||||
// returns cel.DynType as the parse step cannot infer types.
 | 
			
		||||
func (ast *Ast) OutputType() *Type {
 | 
			
		||||
	t, err := ExprTypeToType(ast.ResultType())
 | 
			
		||||
	if err != nil {
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										6
									
								
								vendor/github.com/google/cel-go/cel/macro.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										6
									
								
								vendor/github.com/google/cel-go/cel/macro.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -20,6 +20,10 @@ import (
 | 
			
		||||
	exprpb "google.golang.org/genproto/googleapis/api/expr/v1alpha1"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
// Macro describes a function signature to match and the MacroExpander to apply.
 | 
			
		||||
//
 | 
			
		||||
// Note: when a Macro should apply to multiple overloads (based on arg count) of a given function,
 | 
			
		||||
// a Macro should be created per arg-count or as a var arg macro.
 | 
			
		||||
type Macro = parser.Macro
 | 
			
		||||
 | 
			
		||||
// MacroExpander converts a call and its associated arguments into a new CEL abstract syntax tree, or an error
 | 
			
		||||
@@ -85,7 +89,7 @@ func MapMacroExpander(meh MacroExprHelper, target *exprpb.Expr, args []*exprpb.E
 | 
			
		||||
	return parser.MakeMap(meh, target, args)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// MakeFilter expands the input call arguments into a comprehension which produces a list which contains
 | 
			
		||||
// FilterMacroExpander expands the input call arguments into a comprehension which produces a list which contains
 | 
			
		||||
// only elements which match the provided predicate expression:
 | 
			
		||||
// <iterRange>.filter(<iterVar>, <predicate>)
 | 
			
		||||
func FilterMacroExpander(meh MacroExprHelper, target *exprpb.Expr, args []*exprpb.Expr) (*exprpb.Expr, *common.Error) {
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										2
									
								
								vendor/github.com/google/cel-go/parser/macro.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								vendor/github.com/google/cel-go/parser/macro.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -284,7 +284,7 @@ const (
 | 
			
		||||
	quantifierExistsOne
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
// MakeExists expands the input call arguments into a comprehension that returns true if all of the
 | 
			
		||||
// MakeAll expands the input call arguments into a comprehension that returns true if all of the
 | 
			
		||||
// elements in the range match the predicate expressions:
 | 
			
		||||
// <iterRange>.all(<iterVar>, <predicate>)
 | 
			
		||||
func MakeAll(eh ExprHelper, target *exprpb.Expr, args []*exprpb.Expr) (*exprpb.Expr, *common.Error) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user