Closed
Description
Declaring a set in the global scope fails. This however is not the case with a local scope like a function.
s: set[str] = {"a", "b", "c", "a"}
s.add("d")
(base) saurabh-kumar@Awadh:~/Projects/System/lpython$ ./src/bin/lpython ./examples/example.py
code generation error: Variable type not supported 6
--> ./examples/example.py:1:1
|
1 | s: set[str] = {"a", "b", "c", "a"}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Note: Please report unclear or confusing messages as bugs at
https://github.com/lcompilers/lpython/issues.
As it turns out, the error message is not clear too.
Metadata
Metadata
Assignees
Labels
No labels