env_print incorrectly labels binding as promise #554
Closed
Labels
Comments
We should probably climb forced promises trails to get the right types. |
I think there's something slightly more subtle going on: library(rlang)
e <- env()
env_bind_exprs(e, x = 1)
env_binding_are_promise(e)
#> x
#> TRUE
rlang:::env_binding_type_sum(e)
#> x
#> "promise"
e$x
#> [1] 1
env_binding_are_promise(e)
#> x
#> FALSE
rlang:::env_binding_type_sum(e)
#> x
#> "promise" |
Oh it's because library(rlang)
e <- env()
env_bind_exprs(e, x = 1)
e$x
#> [1] 1
env_get(e, "x")
#> <promise: 0x7fae45ac2b50> |
What is the desired behaviour here? Maybe |
I was wondering about that. |
What about active bindings? |
|
(i.e. the result of calling the active function) |
I can implement this, I think - it just needs a couple of if statements at the end of |
yup a new branch calling |
hadley
added a commit
that referenced
this issue
Aug 13, 2018
hadley
added a commit
that referenced
this issue
Aug 13, 2018
lionel-
added a commit
that referenced
this issue
Aug 13, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Created on 2018-07-03 by the reprex package (v0.2.0).
The text was updated successfully, but these errors were encountered: