| 4395 | } |
| 4396 | |
| 4397 | public static class LambdaAccess extends AbstractItem implements Expr, Bindable { |
| 4398 | |
| 4399 | public LambdaAccess(Decl.Binding<Type.Callable,Decl.Callable> name, Type parameters) { |
| 4400 | super(EXPR_lambdaaccess, name, parameters); |
| 4401 | } |
| 4402 | |
| 4403 | @Override |
| 4404 | public Type getType() { |
| 4405 | return getLink().getTarget().getType(); |
| 4406 | } |
| 4407 | |
| 4408 | @Override |
| 4409 | public void setType(Type type) { |
| 4410 | if(!type.equals(Type.Bool)) { |
| 4411 | throw new IllegalArgumentException(); |
| 4412 | } |
| 4413 | } |
| 4414 | |
| 4415 | @Override |
| 4416 | public Decl.Link<Decl.Callable> getLink() { |
| 4417 | return getBinding().getLink(); |
| 4418 | } |
| 4419 | |
| 4420 | @Override |
| 4421 | public Decl.Binding<Type.Callable, Decl.Callable> getBinding() { |
| 4422 | return (Decl.Binding<Type.Callable, Decl.Callable>) get(0); |
| 4423 | } |
| 4424 | |
| 4425 | @SuppressWarnings("unchecked") |
| 4426 | public Type getParameterTypes() { |
| 4427 | return (Type) get(1); |
| 4428 | } |
| 4429 | |
| 4430 | @SuppressWarnings("unchecked") |
| 4431 | @Override |
| 4432 | public Syntactic.Item clone(Syntactic.Item[] operands) { |
| 4433 | return new LambdaAccess((Decl.Binding<Type.Callable, Decl.Callable>) operands[0], |
| 4434 | (Type.Tuple) operands[1]); |
| 4435 | } |
| 4436 | |
| 4437 | public static final Descriptor DESCRIPTOR_0 = new Descriptor(Operands.TWO, Data.ZERO, "EXPR_lambdaaccess") { |
| 4438 | @SuppressWarnings("unchecked") |
| 4439 | @Override |
| 4440 | public Syntactic.Item construct(int opcode, Syntactic.Item[] operands, byte[] data) { |
| 4441 | return new LambdaAccess((Decl.Binding<Type.Callable, Decl.Callable>) operands[0], |
| 4442 | (Type) operands[1]); |
| 4443 | } |
| 4444 | }; |
| 4445 | |
| 4446 | } |
| 4447 | |
| 4448 | // ========================================================================= |
| 4449 | // Array Expressions |
nothing calls this directly
no outgoing calls
no test coverage detected