From 190f1ab0979b8f54976b8621a11f5bd61d53dba2 Mon Sep 17 00:00:00 2001 From: Raffi Khatchadourian Date: Sun, 21 Jul 2024 15:18:09 -0400 Subject: [PATCH] Throw an exception for unexpected wildcard reads. --- .../callgraph/PythonSSAPropagationCallGraphBuilder.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/com.ibm.wala.cast.python/source/com/ibm/wala/cast/python/ipa/callgraph/PythonSSAPropagationCallGraphBuilder.java b/com.ibm.wala.cast.python/source/com/ibm/wala/cast/python/ipa/callgraph/PythonSSAPropagationCallGraphBuilder.java index 9cfc38fc..ce3929ec 100644 --- a/com.ibm.wala.cast.python/source/com/ibm/wala/cast/python/ipa/callgraph/PythonSSAPropagationCallGraphBuilder.java +++ b/com.ibm.wala.cast.python/source/com/ibm/wala/cast/python/ipa/callgraph/PythonSSAPropagationCallGraphBuilder.java @@ -308,7 +308,14 @@ public void visitPropertyRead(AstPropertyRead instruction) { return v; } }); - } + } else + throw new IllegalArgumentException( + "Not expecting the definition: " + + def + + " of the object reference of: " + + instruction + + " to be: " + + def.getClass()); } // check if we are reading from an module initialization script.