4 Commits
Author SHA1 Message Date
DaenneyandGitHub 13451f69b4 Make WithContext work for methods on env struct (#602)
This makes the WithContext patcher work when passing in a struct for an
env that has methods that take a context.

This is a bit fiddly because we can't quite detect the difference of
function vs. method on a struct, so we have to check both the first and
the second param. Since it's highly unusual to pass the context as
anything other than the first parameter, this should work out just fine
in practice.

Fixes #600.
2024-04-12 22:54:01 +02:00
Anton Medvedev c2a9f54569 Fix type checker to visit all arguments of func even in args count mismatch 2024-01-18 07:52:06 +01:00
Anton Medvedev 551d2a7e0f Use expr-lang/expr 2023-12-03 21:53:01 +01:00
Anton Medvedev 9d12d8fc39 Add expr.WithContext() 2023-11-27 21:52:44 +01:00