qorf / quorum-language

The primary repository for the Quorum Programming Language
BSD 3-Clause "New" or "Revised" License
12 stars 6 forks source link

Return now being allowed in action that returns a boolean #35

Closed GabeContra closed 1 year ago

GabeContra commented 1 year ago

An action that returns a boolean will still compile and try to run if it has a return now statement

Code Example

class Main
    action Test returns boolean
        return now
    end

    action Main
        Test()
    end
end

Here is the error running this example gives:

Error: LinkageError occurred while loading main class quorum.Main
    java.lang.ClassFormatError: Absent Code attribute in method that is not native or abstract in class file quorum/Main
andreas-stefik commented 1 year ago

Fixed.

andreas-stefik commented 1 year ago

I tossed it in the Quorum 10.1 branch, but will merge this into 11 as well.