Dynamic type env fails compilation in v1.17.7
Author: halvfigurCreated Feb 24, 2026Updated Feb 25, 2026
Labelsdocs needed
Something happened in v1.17.7 causing this snippet to fail
t := reflect.New(reflect.StructOf([]reflect.StructField{
{
Name: "value",
Type: reflect.TypeFor[bool](),
PkgPath: "github.com/some/package",
},
})).Elem().Interface()
if _, err := expr.Compile("value", expr.Env(t)); err != nil {
panic(err)
}it compiles without error in v1.17.6
Source: expr-lang/expr