Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

May not return value in this else-if branch #571

Merged
merged 1 commit into from

2 participants

@renkun-ken

test case:

> logical_abbr(quote(function(x=TRUE, na.rm = TRUE) FALSE ))
Error in if (logical_abbr(x[[i]])) return(TRUE) : 
  argument is of length zero

The credit should go to superdesolator who found the problem in the thread.

@renkun-ken renkun-ken May not return value in this else-if branch
test case:

```rconsole
> logical_abbr(quote(function(x=TRUE, na.rm = TRUE) FALSE ))
Error in if (logical_abbr(x[[i]])) return(TRUE) : 
  argument is of length zero
```
3f7fa71
@hadley hadley merged commit 10e4e74 into hadley:master
@hadley
Owner

Thanks!

@renkun-ken renkun-ken deleted the renkun-ken:patch-4 branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jul 23, 2014
  1. @renkun-ken

    May not return value in this else-if branch

    renkun-ken authored
    test case:
    
    ```rconsole
    > logical_abbr(quote(function(x=TRUE, na.rm = TRUE) FALSE ))
    Error in if (logical_abbr(x[[i]])) return(TRUE) : 
      argument is of length zero
    ```
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 0 deletions.
  1. +1 −0  Expressions.rmd
View
1  Expressions.rmd
@@ -694,6 +694,7 @@ logical_abbr <- function(x) {
for (i in seq_along(x)) {
if (logical_abbr(x[[i]])) return(TRUE)
}
+ FALSE
} else {
stop("Don't know how to handle type ", typeof(x),
call. = FALSE)
Something went wrong with that request. Please try again.