From 64225c31a6e133c64698c5f915abb189944704d8 Mon Sep 17 00:00:00 2001 From: Anders Schack-Mulligen Date: Thu, 4 Jun 2020 10:31:08 +0200 Subject: [PATCH] Java: Add test case. --- java/ql/test/library-tests/typeflow/A.java | 7 +++++++ java/ql/test/library-tests/typeflow/typeflow.expected | 1 + 2 files changed, 8 insertions(+) diff --git a/java/ql/test/library-tests/typeflow/A.java b/java/ql/test/library-tests/typeflow/A.java index a3e3e2320b8c..d4ed45df1588 100644 --- a/java/ql/test/library-tests/typeflow/A.java +++ b/java/ql/test/library-tests/typeflow/A.java @@ -85,4 +85,11 @@ public void put(String k, String v) { empty.put(k, v); } } + + public void m8(Object[] xs, int i) { + if (xs[i] instanceof Integer) { + Object n = xs[i]; + Object r = n; + } + } } diff --git a/java/ql/test/library-tests/typeflow/typeflow.expected b/java/ql/test/library-tests/typeflow/typeflow.expected index a9bf42bc5ade..1f879fe37eae 100644 --- a/java/ql/test/library-tests/typeflow/typeflow.expected +++ b/java/ql/test/library-tests/typeflow/typeflow.expected @@ -12,3 +12,4 @@ | A.java:61:11:61:11 | x | Integer | false | | A.java:67:22:67:22 | x | Integer | false | | A.java:70:23:70:24 | x2 | Integer | false | +| A.java:92:18:92:18 | n | Integer | false |