creating:safety

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
creating:safety [2025/11/03 23:15] – Use instanceof-cast syntax and new switch syntax ahelwercreating:safety [2025/11/03 23:16] (current) – Removed extra line of code ahelwer
Line 69: Line 69:
     for (Stmt unit : spec) {     for (Stmt unit : spec) {
       if (unit instanceof Stmt.OpDef op) {       if (unit instanceof Stmt.OpDef op) {
-        Stmt.OpDef op = (Stmt.OpDef)unit; 
         switch (op.name.lexeme) {         switch (op.name.lexeme) {
           case "Init"   -> init = op;           case "Init"   -> init = op;
  • creating/safety.txt
  • Last modified: 2025/11/03 23:16
  • by ahelwer