ballercat/walt

Top Level StringLiteral constants

Open

#115 aperta il 1 mag 2018

Vedi su GitHub
 (3 commenti) (0 reazioni) (0 assegnatari)JavaScript (155 fork)batch import
buggood first issuehelp wanted

Metriche repository

Star
 (4637 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

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;
}

Guida contributor