Example #1
0
 @Override
 public Type typecheck(Environment env, Optional<Type> expected) {
   Environment outerEnv =
       env.lookupBinding("oev", TSLBlock.OuterTypecheckBinding.class)
           .map(oeb -> oeb.getStore())
           .orElse(Environment.getEmptyEnvironment());
   Type exnType = exn.typecheck(outerEnv, expected);
   cached = Optional.of(exnType);
   return exnType;
 }
Example #2
0
 public ExtensionResolver(EnvironmentResolver env, Binding binding) {
   this.env = env;
   this.iEnv = Environment.getEmptyEnvironment().extend(binding);
 }