forked from phoedos/pmd
parent
36c1738135
commit
909e86ca99
@ -20,6 +20,7 @@ This is a {{ site.pmd.release_type }} release.
|
||||
(ApexCRUDViolation, CognitiveComplexity, OperationWithLimitsInLoop)
|
||||
* [#5163](https://github.com/pmd/pmd/issues/5163): \[apex] Parser error when using toLabel in SOSL query
|
||||
* [#5182](https://github.com/pmd/pmd/issues/5182): \[apex] Parser error when using GROUPING in a SOQL query
|
||||
* [#5218](https://github.com/pmd/pmd/issues/5218): \[apex] Parser error when using nested subqueries in SOQL
|
||||
* core
|
||||
* [#5059](https://github.com/pmd/pmd/issues/5059): \[core] xml output doesn't escape CDATA inside its own CDATA
|
||||
* [#5201](https://github.com/pmd/pmd/issues/5201): \[core] PMD sarif schema file points to nonexistent location
|
||||
|
@ -94,4 +94,12 @@ class ApexTreeDumpTest extends BaseTreeDumpTest {
|
||||
void triggersWithMethods() {
|
||||
doTest("TriggerWithMethod");
|
||||
}
|
||||
|
||||
/**
|
||||
* @see <a href="https://github.com/pmd/pmd/issues/5218">[apex] Parser error when using nested subqueries in SOQL</a>
|
||||
*/
|
||||
@Test
|
||||
void nestedSubqueries() {
|
||||
doTest("NestedSubqueries");
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,5 @@
|
||||
public with sharing class NestedSubqueries {
|
||||
public NestedSubqueries() {
|
||||
Schema.Account account = [SELECT Id, (SELECT Id, (SELECT Id FROM CaseComments) FROM Cases) FROM Account LIMIT 1];
|
||||
}
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
+- ApexFile[@DefiningType = "NestedSubqueries", @RealLoc = true]
|
||||
+- UserClass[@DefiningType = "NestedSubqueries", @Image = "NestedSubqueries", @InterfaceNames = (), @Nested = false, @RealLoc = true, @SimpleName = "NestedSubqueries", @SuperClassName = ""]
|
||||
+- ModifierNode[@Abstract = false, @DefiningType = "NestedSubqueries", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 1, @Override = false, @Private = false, @Protected = false, @Public = true, @RealLoc = true, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = true, @WithoutSharing = false]
|
||||
+- Method[@Arity = 0, @CanonicalName = "<init>", @Constructor = true, @DefiningType = "NestedSubqueries", @Image = "NestedSubqueries", @RealLoc = true, @ReturnType = "void", @StaticInitializer = false]
|
||||
+- ModifierNode[@Abstract = false, @DefiningType = "NestedSubqueries", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 1, @Override = false, @Private = false, @Protected = false, @Public = true, @RealLoc = true, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false]
|
||||
+- BlockStatement[@CurlyBrace = true, @DefiningType = "NestedSubqueries", @RealLoc = true]
|
||||
+- VariableDeclarationStatements[@DefiningType = "NestedSubqueries", @RealLoc = true]
|
||||
+- ModifierNode[@Abstract = false, @DefiningType = "NestedSubqueries", @DeprecatedTestMethod = false, @Final = false, @Global = false, @InheritedSharing = false, @Modifiers = 0, @Override = false, @Private = false, @Protected = false, @Public = false, @RealLoc = false, @Static = false, @Test = false, @TestOrTestSetup = false, @Transient = false, @Virtual = false, @WebService = false, @WithSharing = false, @WithoutSharing = false]
|
||||
+- VariableDeclaration[@DefiningType = "NestedSubqueries", @Image = "account", @RealLoc = true, @Type = "Schema.Account"]
|
||||
+- SoqlExpression[@CanonicalQuery = "SELECT Id, (SELECT Id, (SELECT Id FROM CaseComments) FROM Cases) FROM Account LIMIT 1", @DefiningType = "NestedSubqueries", @Query = "SELECT Id, (SELECT Id, (SELECT Id FROM CaseComments) FROM Cases) FROM Account LIMIT 1", @RealLoc = true]
|
||||
+- VariableExpression[@DefiningType = "NestedSubqueries", @Image = "account", @RealLoc = true]
|
||||
+- EmptyReferenceExpression[@DefiningType = null, @RealLoc = false]
|
Loading…
x
Reference in New Issue
Block a user