blitz-research / monkey

Blitz Research Monkey Source
225 stars 59 forks source link

Added protected keyword that restricts visibility to subclasses. #75

Closed swoolcock closed 2 years ago

swoolcock commented 9 years ago

Recreated pull request as a feature branch: https://github.com/blitz-research/monkey/pull/74

swoolcock commented 9 years ago

@blitz-research Do you need some test cases for this?

blitz-research commented 9 years ago

Sorry, busy with some other stuff right now...

On Fri, Mar 20, 2015 at 11:25 AM, Samah notifications@github.com wrote:

@blitz-research https://github.com/blitz-research Do you need some test cases for this?

— Reply to this email directly or view it on GitHub https://github.com/blitz-research/monkey/pull/75#issuecomment-83785506.

blitz-research commented 9 years ago

Ok, I had a shot at adding protected and friend. Just committed the results...

Code for protected is based on your code which seems to work fine. The only bug I found was with errors and ToString().

I disallowed protected at module scope.

Friend syntax is the same is Import - it allows specified friend modules full access to the current module.

Friend should appear at top of file along with imports - before, after, doesn't matter.

On Fri, Mar 20, 2015 at 11:26 AM, Mark Sibly blitzmunter@gmail.com wrote:

Sorry, busy with some other stuff right now...

On Fri, Mar 20, 2015 at 11:25 AM, Samah notifications@github.com wrote:

@blitz-research https://github.com/blitz-research Do you need some test cases for this?

— Reply to this email directly or view it on GitHub https://github.com/blitz-research/monkey/pull/75#issuecomment-83785506.