summary refs log tree commit diff stats
path: root/lib/std/private/gitutils.nim
diff options
context:
space:
mode:
authormetagn <metagngn@gmail.com>2024-09-27 16:34:09 +0300
committerGitHub <noreply@github.com>2024-09-27 15:34:09 +0200
commit821d0806feb3648ced5809a78b07581ea3bd7880 (patch)
treef8d6e773d730e0c390626df0c8db6835c8149f78 /lib/std/private/gitutils.nim
parent2cdc0e913fc6d7b3486b907de502faa508820c42 (diff)
downloadNim-821d0806feb3648ced5809a78b07581ea3bd7880.tar.gz
Revert "make default values typed in proc AST same as param sym AST" (#24191)
Reverts #24184, reopens #12942, reopens #19118

#24184 seems to have caused a regression in
https://github.com/c-blake/thes and
https://github.com/c-blake/bu/blob/main/rp.nim#L84 reproducible with
`git clone https://github.com/c-blake/cligen; git clone
https://github.com/c-blake/thes; cd thes; nim c -p=../cligen thes`.
Changing the `const` to `let` makes it compile.

A minimization that is probably the same issue is:

```nim
const a: seq[string] = @[]

proc foo(x = a) =
  echo typeof(x)
  echo x

import macros

macro resemFoo() =
  result = getImpl(bindSym"foo")

block:
  resemFoo() # Error: cannot infer the type of parameter 'x'
```

This should be a regression test in a future reimplementation of #24184.
Diffstat (limited to 'lib/std/private/gitutils.nim')
0 files changed, 0 insertions, 0 deletions
href='#n136'>136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170