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

Static[non-int] + $ string conversion not matching #7611

Open
mratsim opened this issue Apr 14, 2018 · 1 comment
Open

Static[non-int] + $ string conversion not matching #7611

mratsim opened this issue Apr 14, 2018 · 1 comment

Comments

@mratsim
Copy link
Collaborator

mratsim commented Apr 14, 2018

This echoes "Success"

type
  Foo[N: static[int]] = object

proc `$`[N: static[int]](f: Foo[N]): string =
  "Success"

let a = Foo[10]()
echo a

This gives () and is declared but not used hint

type
  Foo[N: static[int8]] = object


proc `$`[N: static[int8]](f: Foo[N]): string =
  "Success"

let a = Foo[10]()
echo a
@metagn
Copy link
Collaborator

metagn commented Apr 14, 2018

10'i8 works

Related to #12559

@ghost ghost added the Static[T] label Apr 14, 2018
bung87 added a commit to bung87/Nim that referenced this issue Dec 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants