MCPcopy Create free account
hub / github.com/Whiley/WhileyCompiler / visitInvoke

Method visitInvoke

src/main/java/wyil/check/UnsafeCheck.java:48–57  ·  view source on GitHub ↗
(Expr.Invoke expr)

Source from the content-addressed store, hash-verified

46 }
47
48 @Override
49 public void visitInvoke(Expr.Invoke expr) {
50 Decl.Link<Decl.Callable> name = expr.getLink();
51 Decl.Named<?> enclosing = expr.getAncestor(Decl.Named.class);
52 //
53 if(isUnsafe(name.getTarget()) && !isUnsafe(enclosing)) {
54 syntaxError(expr, UNSAFECALL_NOT_PERMITTED);
55 }
56 super.visitInvoke(expr);
57 }
58
59 @Override
60 public void visitLambdaAccess(Expr.LambdaAccess expr) {

Callers

nothing calls this directly

Calls 5

isUnsafeMethod · 0.95
syntaxErrorMethod · 0.95
getLinkMethod · 0.65
getAncestorMethod · 0.65
getTargetMethod · 0.65

Tested by

no test coverage detected