Branch: Tag:

2002-05-11

2002-05-11 01:23:43 by Martin Stjernholm <mast@lysator.liu.se>

Lookups with Foo::bar where Foo is the name of a surrounding class should
not be static/inline.

Rev: src/language.yacc:1.281
Rev: src/testsuite.in:1.513

1: - test_true([["$Id: testsuite.in,v 1.512 2002/05/10 22:20:57 mast Exp $"]]); + test_true([["$Id: testsuite.in,v 1.513 2002/05/11 01:23:43 mast Exp $"]]);      cond([[all_constants()->_verify_internals]],   [[
2071:    class Y { inherit X:banan; void hopp() { banan::hej(); } }   ]])    - // Testing static resolving with :: + // Testing hidden identifier lookup with ::      test_program([[    class X {
2162:    int a() {return X()->f("L") == "LXA";}   ]])    + test_program([[ +  class A { +  string f() {return "A";} +  string g() {return A::f();} +  } +  class B { +  inherit A; +  string f() {return "B";} +  } +  int a() {return B()->g() == "B";} + ]]) +  + test_program([[ +  class A { +  string g() {return A::f();} +  string f() {return "A";} +  } +  class B { +  inherit A; +  string f() {return "B";} +  } +  int a() {return B()->g() == "B";} + ]]) +  + test_program([[ +  class A { +  string f() {return "A";} +  string g() {return A::f();} +  } +  class B { +  string f() {return "B";} +  inherit A; +  } +  int a() {return B()->g() == "B";} + ]]) +  + test_program([[ +  class A { +  string f() {return "A";} +  class I { +  string g() {return A::f();} +  } +  } +  class B { +  inherit A; +  string f() {return "B";} +  } +  int a() {return B()->I()->g() == "B";} + ]]) +    // Testing 'global::'      test_equal([[