This repository has been archived by the owner on Sep 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #565 from Jaseci-Labs/thakee-access-pass
access check for symbols implemented
- Loading branch information
Showing
5 changed files
with
216 additions
and
200 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,14 @@ | ||
obj :priv BankAccount { | ||
has account_no: int; | ||
can register() { | ||
print(f"{self.account_no} has been registered."); | ||
} | ||
} | ||
can :priv privmethod() { | ||
return "private method"; | ||
} | ||
can :priv overide_check() { | ||
return "inside access_check"; | ||
} | ||
glob :priv b=1; | ||
glob :priv p=0; | ||
|
||
obj :pub ModulePublObj {} | ||
obj :priv ModulePrivObj {} | ||
|
||
glob :pub module_publ_glob:int = 0; | ||
glob :priv module_priv_glob:int = 0; | ||
|
||
with entry { | ||
public = BankAccount(123); | ||
public.register(); | ||
privmethod(); | ||
ModulePrivObj(); # <-- okey. | ||
ModulePublObj(); # <-- okey. | ||
|
||
module_publ_glob; # <-- okey. | ||
module_priv_glob; # <-- okey. | ||
} |
Oops, something went wrong.