The following generates a good error message, but the lack of `set` types is a severe limiitation. ```python INTEGER_KINDS : set[i32] = {1, 2, 4, 8} LOGICAL_KINDS : set[i32] = {1, 2, 4} REAL_KINDS : set[i32] = {4, 8} COMPLEX_KINDS : set[i32] = {4, 8} CHARACTER_KINDS : set[i32] = {1} ``` ```bash /Users/brian/CLionProjects/lpython/src/bin/python /Users/brian/CLionProjects/lpython/lasr/LP-pycharm/lasr_parser.py code generation error: Variable type not supported 6 --> /Users/brian/CLionProjects/lpython/lasr/LP-pycharm/lasr_parser.py:58:1 | 58 | CHARACTER_KINDS : set[i32] = {1} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ``` The workaround is undesirable (that's what "severe" means): ```python INTEGER_KINDS : dict[i32, i32] = {1: 1, 2: 2, 4: 4, 8: 8} LOGICAL_KINDS : dict[i32, i32] = {1: 1, 2: 2, 4: 4} REAL_KINDS : dict[i32, i32] = {4: 4, 8: 8} COMPLEX_KINDS : dict[i32, i32] = {4: 4, 8: 8} CHARACTER_KINDS : dict[i32, i32] = {1: 1} ``` The workaround hints at a possible easy fix.
Activity