Branch: Tag:

2014-12-04

2014-12-04 19:23:21 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler: Added support for ::this_program.

This syntax refers to the previous definition of the current class
in its parent, and is typically used with inherit like:

inherit Foo;

// Override the Bar inherited from Foo.
class Bar {
// Bar is based on the implementation from Foo.
inherit ::this_program;

// ...
}

Note that this change is slightly incompatible with Pike 7.8.

2241:    return B()->f() == A;   ]], 1)    + test_any([[ +  class A { +  class Nested { +  constant nested = 1; +  } +  }; +  class B { +  inherit A; +  class Nested { +  inherit ::this_program; +  constant other = 2; +  } +  }; +  object n = B()->Nested(); +  return n->nested + n->other; + ]], 3) +    dnl test_compile_error(0())   test_compile_error(1())   test_compile_error(""())