Semantic Analysis: Names, Scopes, and Rules Checkpoint

Predict fresh artifacts, diagnose a broken invariant, and test a version boundary. Select one answer per multiple-choice question; numeric responses use the stated integer format. Use review links to revisit the relevant representation, then attempt the independent transfer task.


Get every question correct to pass this checkpoint. You can review feedback, revise your answers, and submit again.

1. For f(); fn f(){ return 1; } in v2, what is the semantic result?

Select one answer.

2. An inner block contains let x=x; and outer x was already declared. Which x can the initializer read?

Select one answer.

3. Why can fn f(a){ return f(a); } resolve its own name during v2 analysis?

Select one answer.

4. An inner const x shadows an outer mutable x. Assignment to x inside the inner block should do what?

Select one answer.

5. Which well-named v2 program can pass analysis but fail at runtime?

Select one answer.

Join Discord