Closed schorg closed 3 years ago
Describe the bug Singleton functions are functions that have a side effect on global resources. Calling them in conditions should not be allowed.
To Reproduce
@[CFunction (binding ="c_f", header = "c_f.h")] extern singleton function f () returns bool @[EntryPoint] activity Main () await f() // singleton in condition -> non-determinism end
Compiles without complains.
Expected behaviour The type checker should detect that the call f() might have a side effect and flag an error.
f()
Describe the bug Singleton functions are functions that have a side effect on global resources. Calling them in conditions should not be allowed.
To Reproduce
Compiles without complains.
Expected behaviour The type checker should detect that the call
f()
might have a side effect and flag an error.