RobinHankin / freegroup

The free group in R
0 stars 0 forks source link

NULL not printed #7

Closed RobinHankin closed 6 years ago

RobinHankin commented 6 years ago

bug:

> x <- abc(4)
> x[x==as.free(0)]
Error in class(obj) <- c(attr(obj, "class"), if (right) c(right = "noquote") else "noquote") : 
  attempt to set an attribute on NULL
> traceback()
4: noquote(unlist(lapply(x, as.character_free, ...)))
3: print(noquote(unlist(lapply(x, as.character_free, ...))))
2: print.free(x)
1: function (x, ...) 
   UseMethod("print")(x)
> 

This is due to print.free(), which applies noquote() to a NULL object:

> noquote(NULL)
Error in class(obj) <- c(attr(obj, "class"), if (right) c(right = "noquote") else "noquote") : 
  attempt to set an attribute on NULL
>