[TS] Evaluate instanceof against the runtime constructor value
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 45/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- kotlin, node.js, typescript
- Área
- compilers, devtools, testing-qa
Línea de trabajo
Start at the current instanceof evaluator and its use of the static EtsIR checkType, then review the focused symbolic-test entry point described in the issue. Account for dependencies JacoDB #390 and UnitTestBot/jacodb#396 before testing. Done means both outcomes share one static RHS type, direct checks remain covered, and generated inputs and results replay in Node.js.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Problem
The current instanceof evaluator uses the static checkType from EtsIR. For a dynamic right-hand side, that type does not identify which constructor object the program actually selected. JacoDB PR #395 therefore marks dynamic checks unsupported instead of reporting a possibly false Boolean.
Minimal TypeScript example
class A {}
class B {}
export function check(useA: boolean): boolean {
const ctor = useA ? A : B;
return new A() instanceof ctor;
}
Node.js returns true for check(true) and false for check(false). The ctor expression must be evaluated once; the membership check must use that runtime value, not its static union type.
Expected support
Use the right-hand constructor value and the left-hand object's prototype chain for the supported class-constructor model. Preserve JavaScript behavior for a non-callable RHS (TypeError) where that value is representable. If custom Symbol.hasInstance is outside the current model, report that case as unsupported explicitly.
Acceptance criteria
- A focused symbolic test obtains both outcomes with the same static RHS type and distinguishes unsupported from failure.
- Generated inputs and results replay in Node.js.
- Direct
value instanceof Aremains covered and correct.
Dependencies: JacoDB #390 (RHS evaluation) and UnitTestBot/jacodb#396 (declared class runtime values). Implement this as a separate USVM PR.
- Lenguaje dominante
- Kotlin
- Estrellas
- 33
- Forks
- 27
- Merge medio
- 2 d 20 h
- PR fusionados (30 d)
- 9
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de UnitTestBot/usvm
-
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
UnitTestBot/usvm#467 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 38/100
UnitTestBot/usvm#465 ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 4/5 3-5 días Aptitud para principiantes 55/100
UnitTestBot/usvm#462 ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
UnitTestBot/usvm#440 ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 4/5 3-5 días Aptitud para principiantes 55/100
UnitTestBot/usvm#439 ·
Los mantenedores suelen responder en 1 día
Todos los issues de UnitTestBot/usvm
Issues similares
-
bug status: needs triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
LawnchairLauncher/lawnchair#7360 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Needs Triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
ankidroid/Anki-Android#22298 · 4 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
trakt/trakt-android#425 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Los mantenedores suelen responder en 1 día
-
Raijin Scans (FR)Posiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. AbiertoBug Domain changed
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
keiyoushi/extensions-source#19644 · 1 reacción ·
Los mantenedores suelen responder en 1 día