coreblocks
coreblocks copied to clipboard
Exclusive branches in diamond call graphs
Suppose we have a code like this:
@def_method(m, method1):
def _():
method3(m)
@def_method(m, method2):
def _():
method3(m)
with Transaction().body(m):
with m.If(foo):
method1(m)
with m.Else():
method2(m)
Currently, an exception "Method 'method3' can't be called twice from the same transaction" will be raised. But these calls are on syntactically different branches, so they could technically be allowed.