Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dotcall mismatch #1072

Closed
fowlmouth opened this issue Apr 6, 2014 · 1 comment · Fixed by #21396
Closed

dotcall mismatch #1072

fowlmouth opened this issue Apr 6, 2014 · 1 comment · Fixed by #21396

Comments

@fowlmouth
Copy link
Contributor

/tmp/aporia/a27.nim(9, 8) Error: type mismatch: got (int, int)
but expected one of:
a27.()(l: string, r: string): string
var x: int

proc foo (some:int):int = some
when true:
  proc `()` (l,r:string): string = nil

block:
  var foo = 42
  echo x.foo

works when no () is defined

@zah zah self-assigned this Apr 12, 2014
@data-man
Copy link
Contributor

Nim-devel now outputs

(9, 9) Error: type mismatch: got <int, int>
but expected one of: 
proc `()`(l, r: string): string
  first type mismatch at position: 1
  required type: string
  but expression 'foo' is of type: int

ringabout added a commit that referenced this issue Feb 19, 2023
survivorm pushed a commit to survivorm/Nim that referenced this issue Feb 28, 2023
capocasa pushed a commit to capocasa/Nim that referenced this issue Mar 31, 2023
bung87 pushed a commit to bung87/Nim that referenced this issue Jul 29, 2023
Clyybber pushed a commit to Clyybber/Nim that referenced this issue Feb 24, 2024
## Summary

Remove the `isConst` parameter from `genBracedInit`, `getNullValue`,
and their subordinate procedures -- `true` is always passed as the
argument.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants