Skip to content

Commit

Permalink
Add a regression test
Browse files Browse the repository at this point in the history
Summary:
This query (or one like it) regressed with an earlier version of the
changes to reordering, so adding a regresion test for it.

Reviewed By: phlalx

Differential Revision: D64835638

fbshipit-source-id: ea16cb036a5288b8461e090587b8eac225952074
  • Loading branch information
Simon Marlow authored and facebook-github-bot committed Oct 26, 2024
1 parent 9e88745 commit 01d8bcd
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[
"@generated",
{
"key": {
"declaration": {
"method": {
"key": {
"name": { "key": "bar" },
"container": {
"class_": {
"key": {
"name": { "key": { "name": { "key": "SourceClass" } } }
}
}
}
}
}
},
"file": { "key": "www/SourceClass.php" },
"span": { "start": 408, "length": 3 }
}
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"@generated": null,
"hack.ClassDeclaration.6": 1,
"hack.DeclarationLocation.6": 1,
"hack.MethodDeclaration.6": 1,
"hack.Name.6": 6,
"hack.QName.6": 3
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
query: |
hack.DeclarationLocation
{
declaration = {
method = hack.MethodDeclaration.6 {
name="bar",
container = {
class_ = hack.ClassDeclaration.6 {
name = hack.QName.6 {
name = "SourceClass",
namespace_ = {nothing={}}
}
}
} | {
interface_ = hack.InterfaceDeclaration.6 {
name=hack.QName.6 {
name = "SourceClass",
namespace_={nothing={}}
}
}
} | {
trait = hack.TraitDeclaration.6 {
name = hack.QName.6 {
name = "SourceClass",
namespace_ = {nothing={}}
}
}
}
}
}
}
perf: true
transform: [gensort, []]

0 comments on commit 01d8bcd

Please sign in to comment.