qorf / quorum-language

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

No error when trying to access private fields #109

Open GabeContra opened 3 months ago

GabeContra commented 3 months ago

This test program here should give an error:

class AccessModifierTest
   action Main
        ClassWithFields obj
        obj:a = 1
        obj:b = 2
        obj:c = 3
        obj:OutputFields()
    end

end

class ClassWithFields
    public integer a = 0
    private integer b = 0
    integer c = 0

    action OutputFields
        output a
        output b
        output c
    end
end

Instead it both compiles, runs, and outputs:

1
2
3