Obsidian icon indicating copy to clipboard operation
Obsidian copied to clipboard

Stop generating inner classes for states

Open pkoronkevich opened this issue 7 years ago • 0 comments

Describe the bug In the generated code, states are represented as inner classes within the contract class. This was fine before some major language changes, where now this is not as important to have the distinction.

To Reproduce The following Obsidian code `main contract C {

C() { ->S1; }

state S1 {};

transaction t() available in S1 { int x = 3; } }`

gives the following error:

C.java:49: error: cannot find symbol t(); ^ symbol: method t() location: class C

because state transactions are located within inner classes (fixed temporarily by another issue by simply copying the state transactions to exist within the main class). Expected behavior No longer generating inner classes for states, but having their transactions and fields in the top-level contract class.

pkoronkevich avatar Jun 08 '18 19:06 pkoronkevich