Open christianp opened 7 years ago
Not sure this can be done, since multiple dispatch means that the interpretation of a function name depends on the types of the evaluated arguments.
If there are two definitions of random_person
, each using different global variables, with one taking a boolean argument and one taking a string, we can't decide which one is being used without evaluating the arguments.
Suppose I have a JME function
random_person()
which returnsrandom(people)
, wherepeople
is a variable defined in the global scope.Numbas.jme.findvars
should inspect the definition ofrandom_person
to find out that it usespeople
. At the moment it doesn't, which means variables can be generated in the wrong order sometimes.