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

Method substitute

src/main/java/wyil/lang/WyilFile.java:6240–6251  ·  view source on GitHub ↗
(java.util.function.Function<Object, Syntactic.Item> binding)

Source from the content-addressed store, hash-verified

6238 }
6239
6240 @Override
6241 public Type substitute(java.util.function.Function<Object, Syntactic.Item> binding) {
6242 Type[] before = getAll();
6243 Type[] after = WyilFile.substitute(before, binding);
6244 if(after == null) {
6245 return null;
6246 } else if (before == after) {
6247 return this;
6248 } else {
6249 return create(after);
6250 }
6251 }
6252
6253 @Override
6254 public Type.Union clone(Syntactic.Item[] operands) {

Callers

nothing calls this directly

Calls 3

getAllMethod · 0.95
substituteMethod · 0.95
createMethod · 0.95

Tested by

no test coverage detected