Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- global base = { static = 1 };
- function base.create()
- {
- // instance
- return class({ local = 2 }, base);
- }
- function base.method( a )
- {
- println({ local = this.local, a });
- }
- global extended = class({}, base );
- function extended.create()
- {
- return class({ local = 5 }, extended );
- }
- function extended.method( a )
- {
- println( "extended" );
- this!base.method( a );
- }
- test1 = base.create();
- test1.method( "yay" );
- test2 = extended.create();
- test2.method( "ext" );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement