Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: c65f0cd80a878e360293239f933d9ed3677b8d227386f0f48bf66f769c9c3b17
Ticket: b108e00ac8b1b6e449ea7843ea605ed27cc68c7c
Defining const with a different value should raise an error
User & Date: juliannoble2 on 2026-01-11 01:35:41
Changes

  1. icomment:
    I would find const more useful if it raised an error in this case. Intuitively it's what I initially expected.
    
    Tip 677's statement:
    
    "The variable must not exist prior to const creating a constant variable (unless it is a constant variable; in that case, const silently does nothing)."
    
    makes no mention of value checking in this case - so I assumed it was deliberate.
    
  2. login: "juliannoble2"
  3. mimetype: "text/plain"