Skip to content

$ uints errors out in JavaScript #7499

@treeform

Description

@treeform
var a: uint16 = 1
echo $a

And so do uint8, uint16, uint32, uint64

output:

test.nim(2, 6) Error: type mismatch: got <uint16>
but expected one of: 
proc `$`(x: string): string
proc `$`(x: int): string
proc `$`(x: char): string
proc `$`[Enum: enum](x: Enum): string
proc `$`[T](x: set[T]): string
proc `$`(x: float): string
proc `$`(x: int64): string
proc `$`[T](x: seq[T]): string
proc `$`[T: tuple |
    object](x: T): string
proc `$`(x: bool): string
proc `$`(x: cstring): string
proc `$`[T, IDX](x: array[IDX, T]): string
Nim Compiler Version 0.18.1 [MacOSX: amd64]
Copyright (c) 2006-2018 by Andreas Rumpf

git hash: 325d76b56a5b26ba2d5ce065574eb6ef736eb179
active boot switches: -d:release

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions