[cling] lambdas have unexpected semantics in the interactive interpreter
Los mantenedores suelen responder en 1 día
@devajithvs ya está trabajando en esto.
Desde el 16/6/2026.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
Explain what you would like to see improved and how.
Running the following lines in the interpreter (line by line, not as a macro) produces an unexpected result (as in, a result that doesn't logically follow from surface knowledge of how the interpreter treats line-by-line statements + how C++ behaves):
int foo = 1
auto f = [=] { return foo; }
f()
foo = 2
f()
Expected output:
(int) 1
(int) 1
Actual output:
ROOT_prompt_1:1:1: warning: captures will be by reference, not copy
auto f = [=]{return foo;}
^
(int) 1
(int) 2
The same happens if we use explicit capture by name: auto f = [foo=foo] { return foo; }.
This is unexpected because, even knowing the variable declarations will be hoisted to the global scope, in regular C++:
- one cannot declare a global capture-default lambda; (should not compile)
- one can declare a global capture-by-named-copy lambda (
[foo=foo]) and it works as expected (captures the value, not the reference).
NOTE: running the same code as a macro works as expected.
ROOT version
master
Installation method
any
Operating system
Linux (likely any)
Additional context
No response
- Lenguaje dominante
- C++
- Estrellas
- 3.3k
- Forks
- 1.6k
- Merge medio
- 2 d 17 h
- PR fusionados (30 d)
- 188
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
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 root-project/root
-
thisroot.sh: wrong ROOTSYS in zsh when the shell's command line has a newlinePosiblemente ocupada @dpiparo la tomó hace 4 días. Abiertobug in:Build System
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
root-project/root#23746 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
[tmva][sofie] Inputs of unsupported type (e.g. float16) give code that does not compile instead of an errorPosiblemente ocupada @lmoneta la tomó hace 14 días. AbiertoAI-Assisted bug in:SOFIE
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
root-project/root#23655 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
[RDataFrame] Code that transforms `#var` alias to `R_rdf_sizeof_var` does not respect string literalsPosiblemente ocupada @vepadulano la tomó hace 1 día. Abiertobug in:RDataFrame
Dificultad 3/5 1-2 días Aptitud para principiantes 71/100
root-project/root#23790 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
TDataMember::GetOffset interfers to TDataMember::GetOffsetCintPosiblemente ocupada @pcanal la tomó hace 1 día. Abiertobug in:Core Libraries
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
root-project/root#23777 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
`TChain::GetEntries` internal caching ineffective?Posiblemente ocupada @pcanal la tomó hace 7 días. Abiertoimprovement in:TTree
root-project/root#23738 · 6 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
Todos los issues de root-project/root
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
bulletphysics/bullet3#4819 ·
-
[YSQL] Local-node initdb reads postgres.bki, but YB clusters bootstrap only from yb_postgres.bkiAbiertoarea/ysql kind/enhancement priority/low status/awaiting-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
yugabyte/yugabyte-db#35763 ·
Los mantenedores suelen responder en 1 día
-
[mimalloc] update to 3.6.0Abiertocategory:port-update
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
Los mantenedores suelen responder en 2 días
-
MinGW build faillureAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
facebookresearch/faiss#5775 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
Eval bug: minimax-m3: build_moe_ffn() drops the per-expert NVFP4 scale → garbled output (M3.1 Flash)Abiertobug-unconfirmed
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día