Skip to content

Problem with Typing String Constants #5

Open

Description

@DavePearce

The following fails to compile:

public export method test() :
    debug ""

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

Activity

  1. DavePearce commented on Nov 3, 2016

    @DavePearce
    MemberAuthor

    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)

  2. changed the title [-]Problem with Typing Constants[/-] [+]Problem with Typing String Constants[/+] on Nov 3, 2016
  3. DavePearce commented on Nov 3, 2016

    @DavePearce
    MemberAuthor

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions