Hacktoberfest 2026: as issues que os mantenedores marcaram para outubro, abertas e boas para iniciantes. Ver issues do Hacktoberfest

[TS] Execute Symbol values without treating them as references

Aberta
#439 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
4/5
Tempo estimado
3-5 dias
Facilidade para iniciantes
55/100
Tipo de issue
Bug
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
kotlin, nodejs, typescript
Domínio
devtools, testing-qa

Direção de pesquisa

Start with the sort mapping in usvm-ts/src/main/kotlin/org/usvm/machine/TsContext.kt and the typeof handling in usvm-ts/src/main/kotlin/org/usvm/machine/expr/TsExprResolver.kt. Add a focused regression for the provided Symbol example after the required Symbol EtsIR is available, then compare the supported result with a concrete Node.js replay. Done means Symbol behavior is represented explicitly, while unsupported operands or environments remain marked as approximations.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

enhancement

Current state (2026-10-14)

Audited against usvm main at 19866c959d.

JacoDB represents Symbol types and intrinsic Symbol.iterator identity for native iteration. USVM still has no general Symbol input/runtime-kind/equality/coercion model.

Remaining acceptance boundary

Implement Symbol value/input identity, typeof symbol and numeric TypeError behavior without conflating symbols with references or strings. Keep intrinsic iterator identity as an existing narrow capability.

Original report and acceptance context, retained for traceability

Problem

The symbolic machine has no Symbol value sort or runtime-kind branch; Symbol-typed values fall outside its type-to-sort mapping.

Minimal TypeScript example

export function kind(value: symbol): string {
  return typeof value;
}

Expected behavior

For a Symbol input, kind returns "symbol". Symbol equality uses identity and numeric coercion raises TypeError; do not collapse symbols into string/object/unknown reference semantics. Requires Symbol EtsIR from UnitTestBot/jacodb#379.

Current source evidence

Sort mapping; typeof cases.

Checked against USVM main 53dce8f3bca2713642c783ba8308a6a360a9e516. This exact snippet is a proposed regression from source audit; it has not yet been run as a new end-to-end test. #368 audits the existing call approximations but does not implement these individual fixes.

Acceptance criteria

  • A focused test checks the symbolic outcome without reporting an approximation as exact semantics.
  • The supported case agrees with concrete TypeScript/Node.js replay.
  • Unsupported operand or environment cases remain explicit.
Linguagem predominante
Kotlin
Estrelas
33
Forks
27
Merge médio
3d 21h
PRs com merge (30d)
88

Preparar o ambiente

Este projeto não oferece contêiner de desenvolvimento, Dockerfile nem guia de contribuição, então a configuração fica por sua conta: comece pelo README e veja nosso guia da primeira contribuição para os passos gerais.

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de UnitTestBot/usvm

Todas as issues de UnitTestBot/usvm

Issues semelhantes

Mais issues de Kotlin

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.