Skip to content

Commit 6a73117

Browse files
authored
Merge pull request #136 from Smit-create/call_fixes
BUG: Fixes for inbuilt function `int` and `float`
2 parents 42d9a08 + 972be03 commit 6a73117

File tree

3 files changed

+16
-14
lines changed

3 files changed

+16
-14
lines changed

src/lpython/semantics/python_ast_to_asr.cpp

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2080,9 +2080,10 @@ class BodyVisitor : public CommonVisitor<BodyVisitor> {
20802080
tmp = ASR::make_ConstantLogical_t(al, x.base.base.loc, result, type);
20812081
return;
20822082
} else if (call_name == "int") {
2083+
ASR::ttype_t *type = ASRUtils::TYPE(ASR::make_Integer_t(al,
2084+
x.base.base.loc, 4, nullptr, 0));
20832085
if (args.size() == 0) {
2084-
tmp = ASR::make_ConstantInteger_t(al, x.base.base.loc, 0,
2085-
ASRUtils::TYPE(ASR::make_Integer_t(al, x.base.base.loc, 4, nullptr, 0)));
2086+
tmp = ASR::make_ConstantInteger_t(al, x.base.base.loc, 0, type);
20862087
return;
20872088
}
20882089
ASR::expr_t* int_expr = args[0];
@@ -2093,31 +2094,32 @@ class BodyVisitor : public CommonVisitor<BodyVisitor> {
20932094
}
20942095
if (ASRUtils::is_integer(*int_type)) {
20952096
int64_t ival = ASR::down_cast<ASR::ConstantInteger_t>(ASRUtils::expr_value(int_expr))->m_n;
2096-
tmp = ASR::make_ConstantInteger_t(al, x.base.base.loc, ival, int_type);
2097+
tmp = ASR::make_ConstantInteger_t(al, x.base.base.loc, ival, type);
20972098

20982099
} else if (ASRUtils::is_character(*int_type)) {
20992100
// convert a string to an int
21002101
char* c = ASR::down_cast<ASR::ConstantString_t>(ASRUtils::expr_value(int_expr))->m_s;
21012102
std::string s = std::string(c);
21022103
int64_t ival = std::stoll(s);
2103-
tmp = ASR::make_ConstantInteger_t(al, x.base.base.loc, ival, int_type);
2104+
tmp = ASR::make_ConstantInteger_t(al, x.base.base.loc, ival, type);
21042105

21052106
} else if (ASRUtils::is_real(*int_type)) {
21062107
int64_t ival = ASR::down_cast<ASR::ConstantReal_t>(ASRUtils::expr_value(int_expr))->m_r;
2107-
tmp = ASR::make_ConstantInteger_t(al, x.base.base.loc, ival, int_type);
2108+
tmp = ASR::make_ConstantInteger_t(al, x.base.base.loc, ival, type);
21082109
} else if (ASRUtils::is_logical(*int_type)) {
21092110
bool rv = ASR::down_cast<ASR::ConstantLogical_t>(int_expr)->m_value;
21102111
int8_t val = rv ? 1 : 0;
2111-
tmp = ASR::make_ConstantInteger_t(al, x.base.base.loc, val, int_type);
2112+
tmp = ASR::make_ConstantInteger_t(al, x.base.base.loc, val, type);
21122113
} else {
21132114
throw SemanticError("int() argument must be real, integer, logical, or a string, not '" +
21142115
ASRUtils::type_to_str(int_type) + "'", x.base.base.loc);
21152116
}
21162117
return;
21172118
} else if (call_name == "float") {
2119+
ASR::ttype_t* type = ASRUtils::TYPE(ASR::make_Real_t(al,
2120+
x.base.base.loc, 8, nullptr, 0));
21182121
if (args.size() == 0) {
2119-
tmp = ASR::make_ConstantReal_t(al, x.base.base.loc, 0.0,
2120-
ASRUtils::TYPE(ASR::make_Real_t(al, x.base.base.loc, 8, nullptr, 0)));
2122+
tmp = ASR::make_ConstantReal_t(al, x.base.base.loc, 0.0, type);
21212123
return;
21222124
}
21232125
ASR::expr_t* float_expr = args[0];
@@ -2128,21 +2130,21 @@ class BodyVisitor : public CommonVisitor<BodyVisitor> {
21282130
}
21292131
if (ASRUtils::is_real(*float_type)) {
21302132
float rv = ASR::down_cast<ASR::ConstantReal_t>(ASRUtils::expr_value(float_expr))->m_r;
2131-
tmp = ASR::make_ConstantReal_t(al, x.base.base.loc, rv, float_type);
2133+
tmp = ASR::make_ConstantReal_t(al, x.base.base.loc, rv, type);
21322134
} else if (ASRUtils::is_integer(*float_type)) {
21332135
// convert an int to a float using implicit cast
21342136
double rv = ASR::down_cast<ASR::ConstantInteger_t>(ASRUtils::expr_value(float_expr))->m_n;
2135-
tmp = ASR::make_ConstantReal_t(al, x.base.base.loc, rv, float_type);
2137+
tmp = ASR::make_ConstantReal_t(al, x.base.base.loc, rv, type);
21362138
} else if (ASRUtils::is_logical(*float_type)) {
21372139
bool rv = ASR::down_cast<ASR::ConstantLogical_t>(float_expr)->m_value;
21382140
float val = rv ? 1.0 : 0.0;
2139-
tmp = ASR::make_ConstantReal_t(al, x.base.base.loc, val, float_type);
2141+
tmp = ASR::make_ConstantReal_t(al, x.base.base.loc, val, type);
21402142
} else if (ASRUtils::is_character(*float_type)) {
21412143
// convert a string to a float
21422144
char* c = ASR::down_cast<ASR::ConstantString_t>(ASRUtils::expr_value(float_expr))->m_s;
21432145
std::string s = std::string(c);
21442146
float rv = std::stof(s);
2145-
tmp = ASR::make_ConstantReal_t(al, x.base.base.loc, rv, float_type);
2147+
tmp = ASR::make_ConstantReal_t(al, x.base.base.loc, rv, type);
21462148
} else {
21472149
throw SemanticError("float() argument must be real, integer, logical, or a string, not '" +
21482150
ASRUtils::type_to_str(float_type) + "'", x.base.base.loc);

tests/reference/asr-constants1-5828e8a.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"outfile": null,
77
"outfile_hash": null,
88
"stdout": "asr-constants1-5828e8a.stdout",
9-
"stdout_hash": "a1d7160442ee4ab86d04983bca738e621758d8cbf225bc4f305331fe",
9+
"stdout_hash": "8c9fda4451766513348b27c125b97eed58984c3db071517ecb58b950",
1010
"stderr": null,
1111
"stderr_hash": null,
1212
"returncode": 0
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
(TranslationUnit (SymbolTable 1 {main_program: (Program (SymbolTable 12 {}) main_program [] []), test_abs: (Subroutine (SymbolTable 4 {a: (Variable 4 a Local () () Default (Integer 4 []) Source Public Required .false.), b: (Variable 4 b Local () () Default (Real 4 []) Source Public Required .false.)}) test_abs [] [(= (Var 4 a) (ConstantInteger 5 (Integer 4 [])) ()) (= (Var 4 a) (ConstantInteger 500 (Integer 4 [])) ()) (= (Var 4 a) (ConstantInteger 0 (Logical 1 [])) ()) (= (Var 4 a) (ConstantInteger 1 (Logical 1 [])) ()) (= (Var 4 b) (ConstantReal 3.450000 (Real 8 [])) ()) (= (Var 4 b) (ConstantReal 5346.340000 (Real 8 [])) ()) (= (Var 4 b) (ConstantReal 6.577424 (Complex 8 [])) ())] Source Public Implementation () .false. .false.), test_bool: (Subroutine (SymbolTable 6 {a: (Variable 6 a Local () () Default (Logical 1 []) Source Public Required .false.)}) test_bool [] [(= (Var 6 a) (ConstantLogical .false. (Logical 1 [])) ()) (= (Var 6 a) (ConstantLogical .true. (Logical 1 [])) ()) (= (Var 6 a) (ConstantLogical .false. (Logical 1 [])) ()) (= (Var 6 a) (ConstantLogical .false. (Logical 1 [])) ()) (Assert (Compare (Var 6 a) Eq (ConstantLogical .false. (Logical 1 [])) (Logical 4 []) () ()) ()) (= (Var 6 a) (ConstantLogical .true. (Logical 1 [])) ()) (= (Var 6 a) (ConstantLogical .true. (Logical 1 [])) ()) (Assert (Compare (Var 6 a) Eq (ConstantLogical .true. (Logical 1 [])) (Logical 4 []) () ()) ())] Source Public Implementation () .false. .false.), test_boz: (Subroutine (SymbolTable 2 {b: (Variable 2 b Local () () Default (Character 1 -2 () []) Source Public Required .false.)}) test_boz [] [(= (Var 2 b) (ConstantString "0b101" (Character 1 1 () [])) ()) (= (Var 2 b) (ConstantString "0b1000000" (Character 1 1 () [])) ()) (= (Var 2 b) (ConstantString "-0b1000010110" (Character 1 1 () [])) ()) (= (Var 2 b) (ConstantString "0o10" (Character 1 1 () [])) ()) (= (Var 2 b) (ConstantString "0o70" (Character 1 1 () [])) ()) (= (Var 2 b) (ConstantString "-0o1026" (Character 1 1 () [])) ()) (= (Var 2 b) (ConstantString "0x2a" (Character 1 1 () [])) ()) (= (Var 2 b) (ConstantString "0xc0ffee" (Character 1 1 () [])) ()) (= (Var 2 b) (ConstantString "-0x216" (Character 1 1 () [])) ())] Source Public Implementation () .false. .false.), test_callable: (Subroutine (SymbolTable 8 {a: (Variable 8 a Local () () Default (Logical 1 []) Source Public Required .false.), b: (Variable 8 b Local () () Default (Integer 4 []) Source Public Required .false.)}) test_callable [] [(= (Var 8 b) (ConstantInteger 2 (Integer 4 [])) ()) (= (Var 8 a) (ConstantLogical .true. (Logical 1 [])) ()) (Assert (Compare (Var 8 a) Eq (ConstantLogical .true. (Logical 1 [])) (Logical 4 []) () ()) ()) (= (Var 8 a) (ConstantLogical .false. (Logical 1 [])) ()) (Assert (Compare (Var 8 a) Eq (ConstantLogical .false. (Logical 1 [])) (Logical 4 []) () ()) ()) (= (Var 8 a) (ConstantLogical .false. (Logical 1 [])) ()) (Assert (Compare (Var 8 a) Eq (ConstantLogical .false. (Logical 1 [])) (Logical 4 []) () ()) ())] Source Public Implementation () .false. .false.), test_divmod: (Subroutine (SymbolTable 11 {a: (Variable 11 a Local () () Default (Integer 4 []) Source Public Required .false.)}) test_divmod [] [(= (Var 11 a) (ConstantTuple [(ConstantInteger 3 (Integer 4 [])) (ConstantInteger 0 (Integer 4 []))] (Tuple [(Integer 4 []) (Integer 4 [])])) ()) (= (Var 11 a) (ConstantTuple [(ConstantInteger -3 (Integer 4 [])) (ConstantInteger 0 (Integer 4 []))] (Tuple [(Integer 4 []) (Integer 4 [])])) ()) (= (Var 11 a) (ConstantTuple [(ConstantInteger 1 (Integer 4 [])) (ConstantInteger 0 (Integer 4 []))] (Tuple [(Integer 4 []) (Integer 4 [])])) ()) (= (Var 11 a) (ConstantTuple [(ConstantInteger 0 (Integer 4 [])) (ConstantInteger 4 (Integer 4 []))] (Tuple [(Integer 4 []) (Integer 4 [])])) ()) (= (Var 11 a) (ConstantTuple [(ConstantInteger 0 (Integer 4 [])) (ConstantInteger 0 (Integer 4 []))] (Tuple [(Integer 4 []) (Integer 4 [])])) ())] Source Public Implementation () .false. .false.), test_float: (Subroutine (SymbolTable 10 {a: (Variable 10 a Local () () Default (Real 8 []) Source Public Required .false.)}) test_float [] [(= (Var 10 a) (ConstantReal 0.000000 (Real 8 [])) ()) (= (Var 10 a) (ConstantReal 4.560000 (Real 8 [])) ()) (= (Var 10 a) (ConstantReal 5.000000 (Integer 4 [])) ()) (= (Var 10 a) (ConstantReal -1.000000 (Integer 4 [])) ()) (= (Var 10 a) (ConstantReal 1.000000 (Logical 1 [])) ()) (= (Var 10 a) (ConstantReal 0.000000 (Logical 1 [])) ()) (= (Var 10 a) (ConstantReal 5346.000000 (Character 1 4 () [])) ()) (= (Var 10 a) (ConstantReal 423.533997 (Character 1 7 () [])) ())] Source Public Implementation () .false. .false.), test_int: (Subroutine (SymbolTable 9 {a: (Variable 9 a Local () () Default (Integer 8 []) Source Public Required .false.)}) test_int [] [(= (Var 9 a) (ImplicitCast (ConstantInteger 0 (Integer 4 [])) IntegerToInteger (Integer 8 []) ()) ()) (= (Var 9 a) (ConstantInteger 4 (Real 8 [])) ()) (= (Var 9 a) (ImplicitCast (ConstantInteger 5 (Integer 4 [])) IntegerToInteger (Integer 8 []) ()) ()) (= (Var 9 a) (ConstantInteger -5 (Real 8 [])) ()) (= (Var 9 a) (ConstantInteger 1 (Logical 1 [])) ()) (= (Var 9 a) (ConstantInteger 0 (Logical 1 [])) ()) (= (Var 9 a) (ConstantInteger 5346 (Character 1 4 () [])) ())] Source Public Implementation () .false. .false.), test_len: (Subroutine (SymbolTable 5 {a: (Variable 5 a Local () () Default (Integer 4 []) Source Public Required .false.)}) test_len [] [(= (Var 5 a) (ConstantInteger 0 (Integer 4 [])) ()) (= (Var 5 a) (ConstantInteger 4 (Integer 4 [])) ()) (= (Var 5 a) (ConstantInteger 14 (Integer 4 [])) ()) (= (Var 5 a) (ConstantInteger 3 (Integer 4 [])) ()) (= (Var 5 a) (ConstantInteger 2 (Integer 4 [])) ()) (= (Var 5 a) (ConstantInteger 3 (Integer 4 [])) ()) (= (Var 5 a) (ConstantInteger 2 (Integer 4 [])) ()) (= (Var 5 a) (ConstantInteger 3 (Integer 4 [])) ()) (= (Var 5 a) (ConstantInteger 3 (Integer 4 [])) ())] Source Public Implementation () .false. .false.), test_ord_chr: (Subroutine (SymbolTable 3 {a: (Variable 3 a Local () () Default (Integer 4 []) Source Public Required .false.), s: (Variable 3 s Local () () Default (Character 1 -2 () []) Source Public Required .false.)}) test_ord_chr [] [(= (Var 3 a) (ConstantInteger 53 (Integer 4 [])) ()) (= (Var 3 s) (ConstantString "+" (Character 1 1 () [])) ())] Source Public Implementation () .false. .false.), test_str: (Subroutine (SymbolTable 7 {s: (Variable 7 s Local () () Default (Character 1 -2 () []) Source Public Required .false.)}) test_str [] [(= (Var 7 s) (ConstantString "" (Character 1 1 () [])) ()) (= (Var 7 s) (ConstantString "5" (Character 1 1 () [])) ()) (= (Var 7 s) (ConstantString "-4" (Character 1 1 () [])) ()) (= (Var 7 s) (ConstantString "5.600000" (Character 1 1 () [])) ()) (= (Var 7 s) (ConstantString "True" (Character 1 1 () [])) ()) (= (Var 7 s) (ConstantString "False" (Character 1 1 () [])) ()) (= (Var 7 s) (ConstantString "5346" (Character 1 1 () [])) ())] Source Public Implementation () .false. .false.)}) [])
1+
(TranslationUnit (SymbolTable 1 {main_program: (Program (SymbolTable 12 {}) main_program [] []), test_abs: (Subroutine (SymbolTable 4 {a: (Variable 4 a Local () () Default (Integer 4 []) Source Public Required .false.), b: (Variable 4 b Local () () Default (Real 4 []) Source Public Required .false.)}) test_abs [] [(= (Var 4 a) (ConstantInteger 5 (Integer 4 [])) ()) (= (Var 4 a) (ConstantInteger 500 (Integer 4 [])) ()) (= (Var 4 a) (ConstantInteger 0 (Logical 1 [])) ()) (= (Var 4 a) (ConstantInteger 1 (Logical 1 [])) ()) (= (Var 4 b) (ConstantReal 3.450000 (Real 8 [])) ()) (= (Var 4 b) (ConstantReal 5346.340000 (Real 8 [])) ()) (= (Var 4 b) (ConstantReal 6.577424 (Complex 8 [])) ())] Source Public Implementation () .false. .false.), test_bool: (Subroutine (SymbolTable 6 {a: (Variable 6 a Local () () Default (Logical 1 []) Source Public Required .false.)}) test_bool [] [(= (Var 6 a) (ConstantLogical .false. (Logical 1 [])) ()) (= (Var 6 a) (ConstantLogical .true. (Logical 1 [])) ()) (= (Var 6 a) (ConstantLogical .false. (Logical 1 [])) ()) (= (Var 6 a) (ConstantLogical .false. (Logical 1 [])) ()) (Assert (Compare (Var 6 a) Eq (ConstantLogical .false. (Logical 1 [])) (Logical 4 []) () ()) ()) (= (Var 6 a) (ConstantLogical .true. (Logical 1 [])) ()) (= (Var 6 a) (ConstantLogical .true. (Logical 1 [])) ()) (Assert (Compare (Var 6 a) Eq (ConstantLogical .true. (Logical 1 [])) (Logical 4 []) () ()) ())] Source Public Implementation () .false. .false.), test_boz: (Subroutine (SymbolTable 2 {b: (Variable 2 b Local () () Default (Character 1 -2 () []) Source Public Required .false.)}) test_boz [] [(= (Var 2 b) (ConstantString "0b101" (Character 1 1 () [])) ()) (= (Var 2 b) (ConstantString "0b1000000" (Character 1 1 () [])) ()) (= (Var 2 b) (ConstantString "-0b1000010110" (Character 1 1 () [])) ()) (= (Var 2 b) (ConstantString "0o10" (Character 1 1 () [])) ()) (= (Var 2 b) (ConstantString "0o70" (Character 1 1 () [])) ()) (= (Var 2 b) (ConstantString "-0o1026" (Character 1 1 () [])) ()) (= (Var 2 b) (ConstantString "0x2a" (Character 1 1 () [])) ()) (= (Var 2 b) (ConstantString "0xc0ffee" (Character 1 1 () [])) ()) (= (Var 2 b) (ConstantString "-0x216" (Character 1 1 () [])) ())] Source Public Implementation () .false. .false.), test_callable: (Subroutine (SymbolTable 8 {a: (Variable 8 a Local () () Default (Logical 1 []) Source Public Required .false.), b: (Variable 8 b Local () () Default (Integer 4 []) Source Public Required .false.)}) test_callable [] [(= (Var 8 b) (ConstantInteger 2 (Integer 4 [])) ()) (= (Var 8 a) (ConstantLogical .true. (Logical 1 [])) ()) (Assert (Compare (Var 8 a) Eq (ConstantLogical .true. (Logical 1 [])) (Logical 4 []) () ()) ()) (= (Var 8 a) (ConstantLogical .false. (Logical 1 [])) ()) (Assert (Compare (Var 8 a) Eq (ConstantLogical .false. (Logical 1 [])) (Logical 4 []) () ()) ()) (= (Var 8 a) (ConstantLogical .false. (Logical 1 [])) ()) (Assert (Compare (Var 8 a) Eq (ConstantLogical .false. (Logical 1 [])) (Logical 4 []) () ()) ())] Source Public Implementation () .false. .false.), test_divmod: (Subroutine (SymbolTable 11 {a: (Variable 11 a Local () () Default (Integer 4 []) Source Public Required .false.)}) test_divmod [] [(= (Var 11 a) (ConstantTuple [(ConstantInteger 3 (Integer 4 [])) (ConstantInteger 0 (Integer 4 []))] (Tuple [(Integer 4 []) (Integer 4 [])])) ()) (= (Var 11 a) (ConstantTuple [(ConstantInteger -3 (Integer 4 [])) (ConstantInteger 0 (Integer 4 []))] (Tuple [(Integer 4 []) (Integer 4 [])])) ()) (= (Var 11 a) (ConstantTuple [(ConstantInteger 1 (Integer 4 [])) (ConstantInteger 0 (Integer 4 []))] (Tuple [(Integer 4 []) (Integer 4 [])])) ()) (= (Var 11 a) (ConstantTuple [(ConstantInteger 0 (Integer 4 [])) (ConstantInteger 4 (Integer 4 []))] (Tuple [(Integer 4 []) (Integer 4 [])])) ()) (= (Var 11 a) (ConstantTuple [(ConstantInteger 0 (Integer 4 [])) (ConstantInteger 0 (Integer 4 []))] (Tuple [(Integer 4 []) (Integer 4 [])])) ())] Source Public Implementation () .false. .false.), test_float: (Subroutine (SymbolTable 10 {a: (Variable 10 a Local () () Default (Real 8 []) Source Public Required .false.)}) test_float [] [(= (Var 10 a) (ConstantReal 0.000000 (Real 8 [])) ()) (= (Var 10 a) (ConstantReal 4.560000 (Real 8 [])) ()) (= (Var 10 a) (ConstantReal 5.000000 (Real 8 [])) ()) (= (Var 10 a) (ConstantReal -1.000000 (Real 8 [])) ()) (= (Var 10 a) (ConstantReal 1.000000 (Real 8 [])) ()) (= (Var 10 a) (ConstantReal 0.000000 (Real 8 [])) ()) (= (Var 10 a) (ConstantReal 5346.000000 (Real 8 [])) ()) (= (Var 10 a) (ConstantReal 423.533997 (Real 8 [])) ())] Source Public Implementation () .false. .false.), test_int: (Subroutine (SymbolTable 9 {a: (Variable 9 a Local () () Default (Integer 8 []) Source Public Required .false.)}) test_int [] [(= (Var 9 a) (ImplicitCast (ConstantInteger 0 (Integer 4 [])) IntegerToInteger (Integer 8 []) ()) ()) (= (Var 9 a) (ImplicitCast (ConstantInteger 4 (Integer 4 [])) IntegerToInteger (Integer 8 []) ()) ()) (= (Var 9 a) (ImplicitCast (ConstantInteger 5 (Integer 4 [])) IntegerToInteger (Integer 8 []) ()) ()) (= (Var 9 a) (ImplicitCast (ConstantInteger -5 (Integer 4 [])) IntegerToInteger (Integer 8 []) ()) ()) (= (Var 9 a) (ImplicitCast (ConstantInteger 1 (Integer 4 [])) IntegerToInteger (Integer 8 []) ()) ()) (= (Var 9 a) (ImplicitCast (ConstantInteger 0 (Integer 4 [])) IntegerToInteger (Integer 8 []) ()) ()) (= (Var 9 a) (ImplicitCast (ConstantInteger 5346 (Integer 4 [])) IntegerToInteger (Integer 8 []) ()) ())] Source Public Implementation () .false. .false.), test_len: (Subroutine (SymbolTable 5 {a: (Variable 5 a Local () () Default (Integer 4 []) Source Public Required .false.)}) test_len [] [(= (Var 5 a) (ConstantInteger 0 (Integer 4 [])) ()) (= (Var 5 a) (ConstantInteger 4 (Integer 4 [])) ()) (= (Var 5 a) (ConstantInteger 14 (Integer 4 [])) ()) (= (Var 5 a) (ConstantInteger 3 (Integer 4 [])) ()) (= (Var 5 a) (ConstantInteger 2 (Integer 4 [])) ()) (= (Var 5 a) (ConstantInteger 3 (Integer 4 [])) ()) (= (Var 5 a) (ConstantInteger 2 (Integer 4 [])) ()) (= (Var 5 a) (ConstantInteger 3 (Integer 4 [])) ()) (= (Var 5 a) (ConstantInteger 3 (Integer 4 [])) ())] Source Public Implementation () .false. .false.), test_ord_chr: (Subroutine (SymbolTable 3 {a: (Variable 3 a Local () () Default (Integer 4 []) Source Public Required .false.), s: (Variable 3 s Local () () Default (Character 1 -2 () []) Source Public Required .false.)}) test_ord_chr [] [(= (Var 3 a) (ConstantInteger 53 (Integer 4 [])) ()) (= (Var 3 s) (ConstantString "+" (Character 1 1 () [])) ())] Source Public Implementation () .false. .false.), test_str: (Subroutine (SymbolTable 7 {s: (Variable 7 s Local () () Default (Character 1 -2 () []) Source Public Required .false.)}) test_str [] [(= (Var 7 s) (ConstantString "" (Character 1 1 () [])) ()) (= (Var 7 s) (ConstantString "5" (Character 1 1 () [])) ()) (= (Var 7 s) (ConstantString "-4" (Character 1 1 () [])) ()) (= (Var 7 s) (ConstantString "5.600000" (Character 1 1 () [])) ()) (= (Var 7 s) (ConstantString "True" (Character 1 1 () [])) ()) (= (Var 7 s) (ConstantString "False" (Character 1 1 () [])) ()) (= (Var 7 s) (ConstantString "5346" (Character 1 1 () [])) ())] Source Public Implementation () .false. .false.)}) [])

0 commit comments

Comments
 (0)