You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Template literal strings can interpolate most scalar value types, including strings, numbers, booleans, etc.
However, trying to use a nullable string in a template literal currently leads to a compiler error.
Steps to reproduce
constx: string|null="abc";consts=`test: '${x}'`
ERROR TS2685: The 'this' types of each signature are incompatible.
:
2 │ const s = `test: '${x}'`
│ ~
└─ in assembly/index.ts(3,23)
:
644 │ toString(): String {
│ ~~~~~~~~~~~~~~~~~~
└─ in ~lib/string.ts(644,3)
AssemblyScript version
v0.27.36
The text was updated successfully, but these errors were encountered:
Bug description
Template literal strings can interpolate most scalar value types, including strings, numbers, booleans, etc.
However, trying to use a nullable string in a template literal currently leads to a compiler error.
Steps to reproduce
AssemblyScript version
v0.27.36
The text was updated successfully, but these errors were encountered: