@ -50,6 +50,7 @@ This is a {{ site.pmd.release_type }} release.
|
||||
* [#5086](https://github.com/pmd/pmd/pull/5086): \[plsql] Fixed issue with missing optional table alias in MERGE usage
|
||||
* [#5087](https://github.com/pmd/pmd/pull/5087): \[plsql] Add support for SQL_MACRO
|
||||
* [#5088](https://github.com/pmd/pmd/pull/5088): \[plsql] Add support for 'DEFAULT' clause on the arguments of some oracle functions
|
||||
* [#5133](https://github.com/pmd/pmd/issues/5133): \[plsql] AssertionError: Root of the tree should implement RootNode for a PL/SQL type declaration
|
||||
* cli
|
||||
* [#5120](https://github.com/pmd/pmd/issues/5120): \[cli] Can't start designer under Windows
|
||||
* core
|
||||
|
@ -993,12 +993,8 @@ ASTScalarDataTypeName ScalarDataTypeName() :
|
||||
LOOKAHEAD(4) (<WITH><LOCAL><TIME><ZONE> {name.append(" WITH LOCAL TIME ZONE");}) |
|
||||
LOOKAHEAD(3) (<WITH><TIME><ZONE> {name.append( " WITH TIME ZONE");}) |
|
||||
LOOKAHEAD(2) (<TO><MONTH> {name.append( " TO MONTH");}) |
|
||||
LOOKAHEAD(2) (<TO><SECOND> {name.append( " TO SECOND");}
|
||||
(
|
||||
LOOKAHEAD(2) "(" precision=NumericLiteral() {name.append( "(" + precision) ;}
|
||||
")" {name.append( ")");}
|
||||
)?
|
||||
)
|
||||
LOOKAHEAD(2) <TO><SECOND> { name.append(" TO SECOND"); }
|
||||
[ LOOKAHEAD(2) "(" precision = NumericLiteral() { name.append("(").append(precision.getImage()).append(")"); } ")" ]
|
||||
]
|
||||
|
||||
{ jjtThis.setImage(name.toString()) ; return jjtThis; }
|
||||
|
@ -71,4 +71,9 @@ class PlsqlTreeDumpTest extends BaseTreeDumpTest {
|
||||
void parseSelectExpression() {
|
||||
doTest("SelectExpressions");
|
||||
}
|
||||
|
||||
@Test
|
||||
void issue5133SubTypeDefinition() {
|
||||
doTest("Issue5133SubTypeDefinition");
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,8 @@
|
||||
--
|
||||
-- from https://github.com/pmd/pmd/issues/5133
|
||||
--
|
||||
|
||||
CREATE or REPLACE PACKAGE x as
|
||||
type last_run_duration is interval day(9) to second(6);
|
||||
end x;
|
||||
/
|
@ -0,0 +1,13 @@
|
||||
+- Input[@CanonicalImage = null, @ExcludedLinesCount = 0, @ExcludedRangesCount = 0]
|
||||
+- PackageSpecification[@CanonicalImage = "X", @Image = "x", @ObjectName = "x"]
|
||||
+- ObjectNameDeclaration[@CanonicalImage = "X", @Image = "x"]
|
||||
| +- ID[@CanonicalImage = "X", @Image = "x"]
|
||||
+- DeclarativeSection[@CanonicalImage = null]
|
||||
| +- DeclarativeUnit[@CanonicalImage = null]
|
||||
| +- SubTypeDefinition[@CanonicalImage = "LAST_RUN_DURATION", @Image = "last_run_duration"]
|
||||
| +- QualifiedID[@CanonicalImage = "LAST_RUN_DURATION", @Image = "last_run_duration"]
|
||||
| +- Datatype[@CanonicalImage = "INTERVAL DAY(9) TO SECOND(6)", @Image = "INTERVAL DAY(9) TO SECOND(6)", @TypeImage = "INTERVAL DAY(9) TO SECOND(6)"]
|
||||
| +- ScalarDataTypeName[@CanonicalImage = "INTERVAL DAY(9) TO SECOND(6)", @Image = "INTERVAL DAY(9) TO SECOND(6)"]
|
||||
| +- NumericLiteral[@CanonicalImage = "9", @Image = "9"]
|
||||
| +- NumericLiteral[@CanonicalImage = "6", @Image = "6"]
|
||||
+- ID[@CanonicalImage = "X", @Image = "x"]
|
Reference in New Issue
Block a user