public FieldEnvironment Enter(TypeEnvironment typeEnv) { var fieldDef = typeEnv.Type.ResolveField(this); if (fieldDef == null) { throw new InvalidOperationException("unable to resolve field"); } return(typeEnv.AddField(fieldDef)); }