lpython icon indicating copy to clipboard operation
lpython copied to clipboard

code generation error: Type number '19' not supported

Open memecoder12345678 opened this issue 1 year ago • 4 comments

code generation error: Type number '19' not supported --> input.txt:4:1 | 4 | h = TypeVar("h") | ^^^^^^^^^^^^^^^^

memecoder12345678 avatar Nov 28 '24 14:11 memecoder12345678

Could you please post the full code?

kmr-srbh avatar Nov 30 '24 08:11 kmr-srbh

I believe I found the minimal working code for this @kmr-srbh

main.py

T = TypeVar("h")
$ lpython main.py --show-cpp
code generation error: Type number '19' not supported
 --> main.py:1:1
  |
1 | T = TypeVar("h")
  | ^^^^^^^^^^^^^^^^

I came across it while seeing how c/c++ backend code works

main.py

a: set[i32]
$ lpython test.py --show-c
code generation error: Type number '7' not supported
 --> main.py:1:1
  |
1 | a: set[i32]
  | ^^^^^^^^


Note: Please report unclear or confusing messages as bugs at
https://github.com/lcompilers/lpython/issues.
$ lpython test.py --show-cpp
code generation error: Type number '7' not supported
 --> main.py:1:1
  |
1 | a: set[i32]
  | ^^^^^^^^


Note: Please report unclear or confusing messages as bugs at
https://github.com/lcompilers/lpython/issues.

swamishiju avatar Mar 29 '25 09:03 swamishiju

It seems to be a simple issue I assume the code prints the type directly without using the to_str util ill write a fix and open a PR for it

I assume this was written before the util since the Type number x makes it look intentional

swamishiju avatar Mar 29 '25 09:03 swamishiju

Closed PR should be fixed after ASR sync then we can close this issue

swamishiju avatar Mar 30 '25 11:03 swamishiju