* fix runtime error not allowing to slice unaddressable array type
* simplify logic and move test
* remove dead code
---------
Signed-off-by: Anton Medvedev <[email protected]>
Co-authored-by: Anton Medvedev <[email protected]>
* allow ignoring struct member using a - in expr struct tag
* fix in operator
* simplify logic
* add regression test for #807
* fixes#807: make in operator return false for unexported struct fields
---------
Co-authored-by: Anton Medvedev <[email protected]>
Expand test coverage to newer Go versions and fix compatibility issues:
- Add Go 1.23 and 1.24 to test matrix in test.yml
- Add Go 1.24 to build matrix in build.yml
- Fix example test names to match Go conventions:
* ExampleOperator_Decimal → ExampleOperator_with_decimal
* ExampleWithTimezone → ExampleTimezone
* ExampleGetUnifiedDiffCode → ExampleGetUnifiedDiffString
* ExampleGetContextDiffCode → ExampleGetContextDiffString
* ExampleGetContextDiffString → ExampleGetContextDiffString_second
These changes maintain compatibility with Go 1.18 (as specified in
go.mod) while ensuring the codebase works correctly with the latest
Go versions, which enforce stricter naming conventions for example
tests.
Signed-off-by: Ville Vesilehto <[email protected]>
Co-authored-by: Anton Medvedev <[email protected]>
This PR introduces a new concept inside Expr's type checker - Nature.
It's an abstraction other reflect.Type which carries additional information about possible type, methods and builtin function.
I was able to find and fix a few bugs in type checker and optimizer. Implementation of nature concept has proven itself. As well nature will allow to bring more feature for type checker in future.
Why Nature? I was looking for a name to replace Type. Type name already carries much information, as well can be confused with reflect.Type. Nature name should be understood as "nature of the node", same as "type of the node".
* Enhanced min and max built-in functions to Support Arrays of Integers and Floats
* Enhanced min and max built-in functions to Support Arrays of Integers and Floats
* Add concat() builtin
* Use pkg deref in builtin
* Use pkg deref in checker
* Use pkg deref in types_table.go
* Use pkg deref in docgen.go
* Use pkg deref in vm
* add failing test case: embedded pointer to struct
* fix(dereference embedded pointers to structs)
* add evaluation test for field access and method call on embedded pointer struct