Skip to content

Inconsistent dealing with unknown symbol with (doc) function #520

@socksy

Description

@socksy

The first time you call the doc function on an unknown symbol, it returns nil. After this symbol has been found to be unknown in a new statement, runnning doc on it returns an undefined symbol RuntimeException.

user => (doc foo)
nil
user => foo
ERROR: 
 in pixie function repl_fn

in pixie/repl.pxi at 27:24
               (let [x (eval form)]
                       ^
in internal function eval

in <unknown> at 20:1
foo
^
RuntimeException: :pixie.stdlib/AssertionException Var foo is undefined

user => (doc foo)
ERROR: 
 in pixie function repl_fn

in pixie/repl.pxi at 27:24
               (let [x (eval form)]
                       ^
in internal function eval

in pixie function doc

in pixie/stdlib.pxi at 1454:18
        x (if vr @vr)
                 ^
in polymorphic function -deref dispatching on pixie.stdlib.Var

in internal function __deref

RuntimeException: :pixie.stdlib/AssertionException Var foo is undefined

user => (doc bar)
nil

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions