vsl-lang/VSL

Literal has no overlapping type candidates

Closed this issue · 2 comments

vsl> 123
Type Resolution Error: Literal has no overlapping type candidates.
They are a few reasons this could happen: 1. The STL is not linked
2. You are using a literal which doesn't have a class associated
with it. This is likely an internal bug, but check for an existing
report before leaving your own. You can also try to define your own
candidate using `@primitive(...)`
1 | 123
  | ^^^
2 | 

"Hello, World" and 1.2345 both say the same. That, and also, I don't know how to use @primitive() D:

  • Tested in: the web version of VSL at staging.vihan.org, which is v0.0.2-alpha.3.

I asked a similar question in chat https://chat.stackexchange.com/transcript/message/38593610#38593610 not long ago. So you would have to use @primitive to make literals works.

Okay libvsl-x is now the latest STDLIB. You can generate an LLIR file and then use an LLIR backend to get your LLVM code.