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

macros.sameType is inconsistent for non-concrete types depending on how symbol was bound #21329

Open
awr1 opened this issue Feb 4, 2023 · 0 comments

Comments

@awr1
Copy link
Contributor

awr1 commented Feb 4, 2023

Description

May be strongly related to #14021

import std / macros

# {.experimental: "dynamicBindSym".} makes no difference

macro typedparams(x: typed; y: typed): bool =
  x.sameType(y).newLit
  
macro paramless(): bool =
  "float".bindSym.sameType("SomeFloat".bindSym).newLit
  
echo typedparams(float, SomeFloat) # true
echo paramless() # false?

Nim Version

Nim Compiler Version 1.9.1 [MacOSX: arm64]
Compiled at 2023-01-28
Copyright (c) 2006-2023 by Andreas Rumpf

git hash: 1431f90d8c3d3ed0afcaee62073d5808cea227ff
active boot switches: -d:release
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant