Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add lints for private/protected vars and procs #124

Merged
merged 9 commits into from
Mar 4, 2020

Conversation

spookydonut
Copy link
Collaborator

@spookydonut spookydonut commented Dec 7, 2019

See unit tests for proof

from README

### Private / Protected procs

Use `set SpacemanDMM_private_proc = 1` and 
`set SpacemanDMM_protected_proc = 1` to set procs as private and protected respectively.

* Private procs can only be called by things of exactly the same type
* Protected procs can only be call by things of the same type or subtypes

Additionally, Private procs cannot be overridden.

### Private / Protected vars

Use the above definitions of VAR_PRIVATE and VAR_PROTECTED to declare vars as 
`SpacemanDMM_private`/`SpacemanDMM_protected`.
These function the same way as the proc versions.

@spookydonut
Copy link
Collaborator Author

dont merge this theres some debate about how it should work

@SpaceManiac SpaceManiac changed the title Adds private vars/proc Add lints for private vars and procs Jan 21, 2020
@spookydonut
Copy link
Collaborator Author

This is ready

@spookydonut
Copy link
Collaborator Author

Now with unit tests

@spookydonut spookydonut changed the title Add lints for private vars and procs Add lints for private/protected vars and procs Jan 21, 2020
…nto private

# Conflicts:
#	CONFIGURING.md
#	src/dreamchecker/README.md
#	src/dreamchecker/lib.rs
@spookydonut spookydonut merged commit b285428 into SpaceManiac:master Mar 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant