From 901f756c692860c48131fdeba3e2230a2ea6dabd Mon Sep 17 00:00:00 2001 From: Ian Lynagh Date: Tue, 1 Oct 2024 12:36:38 +0100 Subject: [PATCH 1/2] Java: Add a test for parameter names --- .../library-tests/MemberRefExpr/parameters.expected | 10 ++++++++++ java/ql/test/library-tests/MemberRefExpr/parameters.ql | 5 +++++ 2 files changed, 15 insertions(+) create mode 100644 java/ql/test/library-tests/MemberRefExpr/parameters.expected create mode 100644 java/ql/test/library-tests/MemberRefExpr/parameters.ql diff --git a/java/ql/test/library-tests/MemberRefExpr/parameters.expected b/java/ql/test/library-tests/MemberRefExpr/parameters.expected new file mode 100644 index 000000000000..12f149b5d243 --- /dev/null +++ b/java/ql/test/library-tests/MemberRefExpr/parameters.expected @@ -0,0 +1,10 @@ +| Test.java:3:22:3:24 | o | +| Test.java:7:22:7:26 | i | +| Test.java:45:22:45:26 | s | +| Test.java:49:29:49:42 | p0 | +| Test.java:50:29:50:42 | p0 | +| Test.java:51:29:51:39 | p0 | +| Test.java:52:40:52:64 | p0 | +| Test.java:70:13:70:22 | p0 | +| Test.java:71:13:71:26 | p0 | +| Test.java:75:31:75:47 | p0 | diff --git a/java/ql/test/library-tests/MemberRefExpr/parameters.ql b/java/ql/test/library-tests/MemberRefExpr/parameters.ql new file mode 100644 index 000000000000..d4b8690b4850 --- /dev/null +++ b/java/ql/test/library-tests/MemberRefExpr/parameters.ql @@ -0,0 +1,5 @@ +import java + +from Parameter p +where p.fromSource() +select p From 323b7cb96f84c86176a82ea1b30c52062be86248 Mon Sep 17 00:00:00 2001 From: Ian Lynagh Date: Tue, 1 Oct 2024 12:37:34 +0100 Subject: [PATCH 2/2] Java: Follow change of implicit parameter names --- .../MemberRefExpr/parameters.expected | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/java/ql/test/library-tests/MemberRefExpr/parameters.expected b/java/ql/test/library-tests/MemberRefExpr/parameters.expected index 12f149b5d243..2981f022fef6 100644 --- a/java/ql/test/library-tests/MemberRefExpr/parameters.expected +++ b/java/ql/test/library-tests/MemberRefExpr/parameters.expected @@ -1,10 +1,10 @@ | Test.java:3:22:3:24 | o | | Test.java:7:22:7:26 | i | | Test.java:45:22:45:26 | s | -| Test.java:49:29:49:42 | p0 | -| Test.java:50:29:50:42 | p0 | -| Test.java:51:29:51:39 | p0 | -| Test.java:52:40:52:64 | p0 | -| Test.java:70:13:70:22 | p0 | -| Test.java:71:13:71:26 | p0 | -| Test.java:75:31:75:47 | p0 | +| Test.java:49:29:49:42 | this | +| Test.java:50:29:50:42 | this | +| Test.java:51:29:51:39 | this | +| Test.java:52:40:52:64 | this | +| Test.java:70:13:70:22 | length | +| Test.java:71:13:71:26 | length | +| Test.java:75:31:75:47 | this |