phel-lang icon indicating copy to clipboard operation
phel-lang copied to clipboard

Global bindings are not immutable, contrary to documentation

Open geoffreyvanwyk opened this issue 8 months ago • 26 comments

Q A
Phel version v0.14
PHP version 8.3.7

Summary

The documentation states:

(def name meta? value) This special form binds a value to a global symbol. A definition cannot be redefined at a later point.

Current behavior

A definition can be redefined without an exception being raised.

How to reproduce

Enter the following expressions into the REPL.

(def my-name "PHP")
(def my-name "Phel")

Expected behavior

An exception is raised with a message that my-name is already bound.

geoffreyvanwyk avatar Jun 11 '24 03:06 geoffreyvanwyk