Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information