Given a Python program like the following
y = 10if y < 5:x = 1else:x = 3print(x)
This program won't correctly translate to GrFN due to a bug having to do with the variable x. The variable x doesn't appear before the conditional, and this introduces an issue at the GrFN generation when creating the appropriate GrFN variables.
There are currently two proposed fixes:
Create a dummy variable of sorts at the GrFN level that appears before the conditional starts so that it can generate the GrFN consistently as if a variable really was there.
Create a dummy Assign CAST node at the Python2CAST level before the conditional so that when we get to GrFN there is a variable before the conditional. This would make the GrFN generation work.
The current proposal is to implement the second as a solution, though perhaps in the future the first solution should also be implemented.
Given a Python program like the following
y = 10
if y < 5:
x = 1
else:
x = 3
print(x)
This program won't correctly translate to GrFN due to a bug having to do with the variable
x
. The variablex
doesn't appear before the conditional, and this introduces an issue at the GrFN generation when creating the appropriate GrFN variables. There are currently two proposed fixes:The current proposal is to implement the second as a solution, though perhaps in the future the first solution should also be implemented.