Skip to content

env_print incorrectly labels binding as promise #554

Closed
@hadley

Description

@hadley
library(rlang)

power1 <- function(exponent) {
  function(x) {
    x ^ exponent
  }
}

square <- power1(2)
square(2)
#> [1] 4

env <- get_env(square)
env_print(env)
#> <environment: 0x7ff5c3cf7988>
#>   parent: <environment: global>
#>   bindings:
#>    * exponent: <promise>

env$exponent
#> [1] 2
env_print(env)
#> <environment: 0x7ff5c3cf7988>
#>   parent: <environment: global>
#>   bindings:
#>    * exponent: <promise>

Created on 2018-07-03 by the reprex package (v0.2.0).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions