Nim
                                
                                 Nim copied to clipboard
                                
                                    Nim copied to clipboard
                            
                            
                            
                        mutable view from immutable location
Example
{.experimental: "views".}
proc main(): auto =
  let a = "123"
  var foo: var string = a
  
  foo[0] = '3'
  echo a
main()
https://play.nim-lang.org/#ix=41QU
Current Output
323
Expected Output
Compile-time error
$ nim -v
Nim Compiler Version 1.6.6 [Windows: amd64]
Compiled at 2022-05-05
Copyright (c) 2006-2021 by Andreas Rumpf
active boot switches: -d:release