ballercat/walt

Top Level StringLiteral constants

Open

#115 aberto em 1 de mai. de 2018

Ver no GitHub
 (3 comments) (0 reactions) (0 assignees)JavaScript (155 forks)batch import
buggood first issuehelp wanted

Métricas do repositório

Stars
 (4.637 stars)
Métricas de merge de PR
 (Nenhuma PRs mesclada em 30d)

Description

Bug Report

Overview

Top level StringLiterals fail validation, they should not. Instead, they should compile out to a constant i32 pointer to the data location for a string.

Expected

Top level strings are allowed

Actual

Strings in top-level constants throw validation warnings.

Example

const memory: Memory<{ initial: 1 }>;
const myString: i32 = 'hello world';
export function test(): i32 {
  return myString;
}

Guia do colaborador