forked from facebook/hhvm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: arrange to report on cyclic class definition errors Differential Revision: D34800222 fbshipit-source-id: e82367158d71571c29206094baa568af26dafc2d
- Loading branch information
1 parent
529e554
commit 65b1c95
Showing
5 changed files
with
94 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?hh | ||
|
||
class A extends C {} | ||
class C extends A {} |
66 changes: 66 additions & 0 deletions
66
hphp/hack/test/rupro/folded_decls/cyclic_class.php.folded_decls.exp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
FoldedClass { | ||
name: "\\A", | ||
kind: Cclass( | ||
Concrete, | ||
), | ||
substs: { | ||
"\\C": SubstContext { | ||
subst: Subst( | ||
{}, | ||
), | ||
class_context: "\\A", | ||
from_req_extends: false, | ||
}, | ||
}, | ||
ancestors: { | ||
"\\A": A, | ||
"\\C": C, | ||
}, | ||
consts: { | ||
"class": ClassConst { | ||
is_synthesized: true, | ||
kind: CCConcrete, | ||
pos: NPos, | ||
ty: HH\classname<this>, | ||
origin: "\\A", | ||
refs: [], | ||
}, | ||
}, | ||
extends: { | ||
"\\C", | ||
"\\A", | ||
}, | ||
} | ||
FoldedClass { | ||
name: "\\C", | ||
kind: Cclass( | ||
Concrete, | ||
), | ||
ancestors: { | ||
"\\A": A, | ||
}, | ||
consts: { | ||
"class": ClassConst { | ||
is_synthesized: true, | ||
kind: CCConcrete, | ||
pos: NPos, | ||
ty: HH\classname<this>, | ||
origin: "\\C", | ||
refs: [], | ||
}, | ||
}, | ||
extends: { | ||
"\\A", | ||
}, | ||
decl_errors: [ | ||
Primary( | ||
CyclicClassDef( | ||
NPos, | ||
[ | ||
"\\A", | ||
"\\C", | ||
], | ||
), | ||
), | ||
], | ||
} |