tvl-depot/users/tazjin/presentations/tvix-eval-2023/cppnix-example-smuggling.cpp
Vincent Ambo 0f4eb908ec chore(tazjin/presentations): last minute changes to tvix-eval talk
Change-Id: I788a17f846b35f5635ed7a9ec0d3249b05653d44
Reviewed-on: https://cl.tvl.fyi/c/depot/+/9273
Tested-by: BuildkiteCI
Autosubmit: tazjin <tazjin@tvl.su>
Reviewed-by: tazjin <tazjin@tvl.su>
2023-09-07 12:05:30 +00:00

12 lines
243 B
C++

struct Env {
// ... some struct fields ...
Value* values[0];
};
// ....
if (env->type == Env::HasWithExpr) {
// ...
evalAttrs(*env->up, (Expr *) env->values[0], *v, noPos, "<borked>");
// ^^^^^^^^^^^^^^^^^^^^^^^
}