Skip to content

asint64 not run in run, but in comoile #516

@chyroc

Description

@chyroc
package main

import (
	"fmt"

	"github.com/expr-lang/expr"
)

func main() {
	x, err := expr.Compile(`a`, expr.AsInt64())
	if err != nil {
		panic(err)
	}
	fmt.Println(expr.Run(x, map[string]any{
		"a": int64(1),
	}))
}

result:


panic: expected int64, but got interface {}

expected:

1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions