Bump cel-go to v0.12.1

This commit is contained in:
Cici Huang
2022-07-11 17:05:02 +00:00
parent 772a252b06
commit a421fd4834
9 changed files with 23 additions and 15 deletions

View File

@@ -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 {