Skip to content

TSLANG_ISSUES: 85 (own: a global of three concatenated string literals is refused) - #859

Merged
ASDAlexander77 merged 1 commit into
mainfrom
tslang-issues-85
Nov 15, 2026
Merged

ASDAlexander77 merged 1 commit into
mainfrom
tslang-issues-85

Conversation

@ASDAlexander77

Copy link
Copy Markdown
Owner

What

Adds open item 85 to TSLANG_ISSUES.md.

Under -mm=own, a module-level const built from three or more concatenated string literals is refused at the initializer:

error: the initializer of global 'M.EXPORTS' takes a second reference; -mm=own cannot prove a move or a borrow here yet

One literal or two concatenated literals compile. gc prints the expected string. The entry has a complete repro, run on pre-alpha128 (0c8439c), and a suspected cause that hasn't been checked in the source yet.

Context

Found while removing the native_ts_graphics -mm=own workarounds after the pre-alpha128 bump (ASDAlexander77/native_ts_graphics#325). Of those workarounds, this is the only compiler gap left: examples/sakura_forest_ser.ts keeps libraryExports() instead of a global LIBRARY_EXPORTS.

🤖 Generated with Claude Code

…s is refused)

Under -mm=own, a module-level const whose initializer concatenates three or more string literals
("a" + "b" + "c") is refused at the initializer ("takes a second reference"); two literals compile.
Found on pre-alpha128 (0c8439c) in native_ts_graphics sakura_forest_ser (LIBRARY_EXPORTS), which
keeps a function returning the concatenation as a workaround.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ASDAlexander77
ASDAlexander77 merged commit 2736783 into main Nov 15, 2026
8 checks passed
@ASDAlexander77
ASDAlexander77 deleted the tslang-issues-85 branch November 15, 2026 00:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant