Skip to content

constant redefinition after workspace() fails on master under some circumstances #22434

Closed

Description

Consider:

const X = 1
workspace()
const X = []

On master, putting this in a file and running it results in an error (ERROR: LoadError: invalid redefinition of constant X), although pasting it into the REPL works. It works in both cases on 0.6.

This functionality was useful for package tests, but the docs do say that "This function should only be used interactively." However, I can also make it fail at the REPL if that is desired:

julia> const X = 1; workspace(); const X = []
ERROR: invalid redefinition of constant X
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    docsThis change adds or pertains to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions