I have a function that runs inside different structs, how to know in which struct that my function runs in. Example:
function foo()
#here I need to find out the name of the struct this function runs (which constructor called it)
in, A or B
end
struct A
arg
function A(arg)
foo(arg)
return new(arg)
end
end
struct B
arg
function B(arg)
foo(arg)
return new(arg)
end
end