lpython
lpython copied to clipboard
Python compiler
Add default empty dictionary if initialized without a value.
Type inference fails while converting between types and assigning. Example ```bash >>> x: i32 = i32("123") semantic error: Type mismatch in annotation-assignment, the types must be compatible --> input:1:1 |...
Fixes #2615 The problem is that `_lpython_str_compare_eq` requires pointer to pointer to char as parameters. However, the previous implementation passed a null pointer, leading to a segmentation fault.
Example: Present behavior: ```bash >>> 1 + 2 >>> ``` Expected behavior (after potentially merging this PR): ```bash >>> 1 + 2 3 >>> ``` --- Reference for myself Things...
* [ ] https://github.com/lcompilers/lpython/issues/2472 * [ ] #2258 * [x] https://github.com/lcompilers/lpython/issues/1704 * [x] https://github.com/lcompilers/lpython/issues/1802 * [x] https://github.com/lcompilers/lpython/issues/1825 * [ ] https://github.com/lcompilers/lpython/issues/1826 * [ ] https://github.com/lcompilers/lpython/issues/1828 * [x] https://github.com/lcompilers/lpython/issues/1827 * [x]...
Gruntz Demo
This is a draft PR trying to replicate the gruntz algorithm and a few test cases for the same.
* [ ] use existing class support in ASR, hook it in AST->ASR, add tests: * [ ] use `lfortran integration_tests/class_01.f90 --show-asr` to learn how ASR works for classes (see...
https://github.com/lcompilers/lpython/blob/dfeacbc07fc6cfc837d95b848dcb6370a5876190/integration_tests/CMakeLists.txt#L216 It seems `cpython` and `cpython_sym` labels in the `integration_tests/CMakelists.txt` are similar (or even same). In that case, I think we can remove `cpython_sym` and simply reuse `cpython` for simplicity.
Bug: Catch errors with arrangement of positional & keyword arguments in function definition and call
Currently LPython fails in detecting the correct arrangement of arguments in a function's definition. The bug is chiefly that the compiler allows keyword arguments _before_ positional ones, both when defining...