;
+# 22| 0: [MethodCall] println(...)
+# 22| -1: [TypeAccess] IO
+# 22| 0: [StringLiteral] "Static access test"
+# 25| 11: [Class] NotCompact
diff --git a/java/ql/test/library-tests/compact-source-files/PrintAst.qlref b/java/ql/test/library-tests/compact-source-files/PrintAst.qlref
new file mode 100644
index 000000000000..f391eb5e4636
--- /dev/null
+++ b/java/ql/test/library-tests/compact-source-files/PrintAst.qlref
@@ -0,0 +1 @@
+semmle/code/java/PrintAst.ql
diff --git a/java/ql/test/library-tests/compact-source-files/Test.java b/java/ql/test/library-tests/compact-source-files/Test.java
new file mode 100644
index 000000000000..4b5af13b9693
--- /dev/null
+++ b/java/ql/test/library-tests/compact-source-files/Test.java
@@ -0,0 +1,27 @@
+int instanceField = 10;
+static final int STATIC_CONSTANT = 42;
+private String privateField = "data";
+
+void main() {
+ processData();
+ testStaticAccess();
+}
+
+// Test instance methods
+void processData() {
+ instanceField++;
+ updatePrivateField();
+}
+
+private void updatePrivateField() {
+ privateField = "updated";
+}
+
+// Test static method access
+static void testStaticAccess() {
+ IO.println("Static access test");
+}
+
+class NotCompact {
+//Test explict class
+}
\ No newline at end of file
diff --git a/java/ql/test/library-tests/compact-source-files/options b/java/ql/test/library-tests/compact-source-files/options
new file mode 100644
index 000000000000..db1dc01e53b7
--- /dev/null
+++ b/java/ql/test/library-tests/compact-source-files/options
@@ -0,0 +1 @@
+//semmle-extractor-options: --javac-args --release 25 --enable-preview
pFad - Phonifier reborn
Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies:
Alternative Proxy
pFad Proxy
pFad v3 Proxy
pFad v4 Proxy