Skip to content

Commit 8fc6969

Browse files
authored
Improve behavior in case of not found methods (#3806)
2 parents 05966cc + f58d07c commit 8fc6969

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

key.core/src/main/java/de/uka/ilkd/key/java/ast/reference/MethodReference.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,8 @@ public void visit(Visitor v) {
374374
public KeYJavaType getKeYJavaType(Services services, ExecutionContext ec) {
375375
IProgramMethod meth = method(services, determineStaticPrefixType(services, ec), ec);
376376
if (meth == null) {
377-
return ec.getTypeReference().getKeYJavaType();
377+
throw new IllegalStateException(
378+
"Could not determine type for method " + name.toString());
378379
}
379380
return meth.getReturnType();
380381

key.core/src/main/resources/de/uka/ilkd/key/java/JavaRedux/java/lang/Math.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package java.lang;
22

33
public final class Math {
4-
4+
55
private Math() {}
66

77
/*@ public normal_behavior
@@ -92,4 +92,6 @@ public static float max(float a, float b) {
9292
public static double pow(double a , double b);
9393
public static double exp(double a);
9494
public static double atan(double a);
95+
96+
public static double random();
9597
}

0 commit comments

Comments
 (0)