[hphpi] report errors with wrong interface declarations
commit3f8b446d0b34364dded68b9026d3151c00d5a815
authorhzhao <hzhao@facebook.com>
Sat, 23 Oct 2010 05:33:28 +0000 (22 22:33 -0700)
committermacvicar <macvicar@facebook.com>
Sun, 24 Oct 2010 23:42:08 +0000 (24 16:42 -0700)
treeac9ce2720908add007b0c9eecd0e157e5c20e164
parentd220dcefdf71490105e09c3ee60bbee0aa8006b9
[hphpi] report errors with wrong interface declarations

Summary:
(1) if it's not an interface but an existing class; (2) if a method has
non-public access.

Test Plan:
fast_tests, report same errors as PHP does:

  <?php
  abstract class Foo {}
  class Bar implements Foo {}

  <?php
  interface foo {
    protected function bar();
  }

DiffCamp Revision: 173511
Reviewed By: mwilliams
CC: mwilliams, hphp-diffs@lists
Tasks:
#420345: hphpi allows implementing a non-interface
#419433: ape/hphpi inconsistency

Revert Plan:
OK
src/runtime/eval/ast/class_statement.cpp