Jump to content
  • Advertisement
  • entries
    359
  • comments
    237
  • views
    189181

Tangent: Visibility, Part 2

Sign in to follow this  
Telastyn

215 views

Part 1

The change so that private fields get their own storage is finished. I need to review some of the other visibility related things (name lookup for standalone fields, method dispatch) to finish that snippet of changes. Then will be a release.

A nice side effect of this private field storage change was fixing the bug that prevented static member's initializers from working.

The test/target code for the change:


public class foo{
private int x = 4;

public foox()=>void{
print x;
}
}

public class bar{
private int x = 9;

public barx()=>void{
print x;
}
}

public class foobar:foo, bar{}

public static main()=>void{
local foobar tmp = new foobar;

tmp.foox();
tmp.barx();
// print tmp.x; // properly does not compile.
}





[edit: Also, some documentation regarding the algorithm used to infer the order of operations.]
Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!