Skip to content

Instantly share code, notes, and snippets.

@mrwonko
Created March 19, 2018 21:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mrwonko/f99e6ba0356decd0e29a05696f56783f to your computer and use it in GitHub Desktop.
Save mrwonko/f99e6ba0356decd0e29a05696f56783f to your computer and use it in GitHub Desktop.
Errors in a Nim snippet
in Visual Studio Code with https://play.nim-lang.org/?gist=e609c6c728d4cbf8751f0cf618d4df0e I got these errors:
type mismatch: got <int64> but expected 'bool'
type mismatch: got <Flags, set[range 0..65535(int)]>
but expected one of:
proc `==`(x, y: int32): bool
first type mismatch at position: 1
required type: int32
but expression 'x' is of type: Flags
proc `==`(x, y: int16): bool
first type mismatch at position: 1
required type: int16
but expression 'x' is of type: Flags
proc `==`[T: tuple |
object](x, y: T): bool
first type mismatch at position: 1
required type: T: tuple or object
but expression 'x' is of type: Flags
proc `==`(x, y: cstring): bool
first type mismatch at position: 1
required type: cstring
but expression 'x' is of type: Flags
proc `==`(x, y: char): bool
first type mismatch at position: 1
required type: char
but expression 'x' is of type: Flags
proc `==`[Enum: enum](x, y: Enum): bool
first type mismatch at position: 1
required type: Enum: enum
but expression 'x' is of type: Flags
proc `==`[T](x, y: set[T]): bool
first type mismatch at position: 2
required type: set[T]
but expression '{}' is of type: set[range 0..65535(int)]
proc `==`[T](x, y: ref T): bool
first type mismatch at position: 1
required type: ref T
ordinal type expected
undeclared field: '.'
expression '.' cannot be called
undeclared field: 'Todo'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment