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

Problem with Typing String Constants #5

Open
DavePearce opened this issue Nov 3, 2016 · 2 comments
Open

Problem with Typing String Constants #5

DavePearce opened this issue Nov 3, 2016 · 2 comments
Labels

Comments

@DavePearce
Copy link
Member

The following fails to compile:

public export method test() :
    debug ""

The problem is that the string constant is given the jvm type of void.

@DavePearce DavePearce added the Bug label Nov 3, 2016
@DavePearce
Copy link
Member Author

DavePearce commented Nov 3, 2016

Right. The problem is that the WyIL type of the underlying constant is being inferred as void, which is produced from an array type with element type void.

What's the right solution to this problem?! There is no fix without changing the syntax of the language (which I am planning to do, btw)

@DavePearce DavePearce changed the title Problem with Typing Constants Problem with Typing String Constants Nov 3, 2016
@DavePearce
Copy link
Member Author

See here for reference:

Whiley/WhileyCompiler#692

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant