Tangent: Visibility, Part 2

Published June 25, 2009
Advertisement
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.]
Previous Entry Tangent: Visibility
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement