use ReadLibTestLib class Program shared def main a = LibEnum.A b = LibEnum.B assert a <> b assert b to uint64 > a to uint64 lc = LibClass() assert lc.readOnlyInstanceField == 0 i = lc.returnNullableInt assert i is nil or i == 1 upc = UseProtectedInitializer() assert upc.i == 1 .globalNameSpace UseProtectedField().run def globalNameSpace a = GlobalA() b = GlobalB() assert a.typeOf.name == 'GlobalA' assert b.typeOf.name == 'GlobalB' class UseProtectedInitializer inherits DeclareProtectedInitializer cue init base.init class UseProtectedField inherits DeclareProtectedField def run assert _protectedField == 0 _protectedField = 1 assert _protectedField == 1