ClojureScript

support ^:const

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Completed
  • Affects Version/s: 0.0-3058
  • Fix Version/s: 0.0-3115
  • Component/s: None
  • Labels:
    None
  • Patch:
    Code and Test

Description

Currently def's do not support ^:const annotations, this is useful in conjunction with case.

  1. cljs_806.patch
    17/Dec/14 4:53 PM
    5 kB
    Peter Schuck
  2. cljs_806v2.patch
    14/Mar/15 2:05 PM
    4 kB
    Peter Schuck

Activity

Hide
Peter Schuck added a comment -

def's marked with ^:const are now treated as constants, they can't be redefined or set to a different value. Currently only case takes advantage of this. Additionally the emitted var is annotated as a constant for the closure compiler.

Show
Peter Schuck added a comment - def's marked with ^:const are now treated as constants, they can't be redefined or set to a different value. Currently only case takes advantage of this. Additionally the emitted var is annotated as a constant for the closure compiler.
Hide
David Nolen added a comment -

This patch looks good can we get one rebased to master? Thanks!

Show
David Nolen added a comment - This patch looks good can we get one rebased to master? Thanks!
Hide
Peter Schuck added a comment -

Patch rebased to master.

Show
Peter Schuck added a comment - Patch rebased to master.

People

Vote (0)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: