You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: enable ZynML runtime execution with multi-param functions
Key fixes for ZynML runtime execution:
1. Integer/Float Literal Types (interpreter.rs)
- Changed default type for integer literals from I32 to I64
- Changed default type for float literals from F32 to F64
- Fixes type mismatch in functions returning i64
2. Parameter List Parsing (ml.zyn)
- Fixed fn_params to collect ALL parameters using prepend_list
- Previously only returned last parameter, breaking multi-arg calls
- Also fixed: trait_params, type_params, fn_type_params, lambda_params
3. Lenient Type Checking (type_checker.rs)
- Unknown variables (external functions) return fresh type var
- Allows gradual typing for ZRTL builtin calls
4. Lenient Trait Registration (lib.rs)
- Skip missing traits with warning instead of error
- Enables compilation with partial trait resolution
5. Builtin Alias Creation (grammar.rs)
- Create both alias extern (println) AND symbol extern ($IO$println)
- Fixes "function not found" for builtin calls
Working features:
- println/print string output
- Multi-argument function calls
- Integer arithmetic (+, *, -, /)
- Conditional statements (if)
- User-defined functions with return values
0 commit comments