@@ -0,0 +1,624 @@
+package error;%0A%0Aimport parse.Loc;%0Aimport types.Type;%0A%0Aimport static error.ErrorManager.em;%0A%0Apublic interface CommonErrors %7B%0A%0A   default void typeMismatch(Loc loc, Type found, Type... expected) %7B%0A      StringBuilder builder = new StringBuilder();%0A      int n = expected.length;%0A      if (n %3E 0) %7B%0A         builder.append(expected%5B0%5D);%0A         if (n %3E 1) %7B%0A            for (int i = 1; i %3C n - 2; i++)%0A               builder.append(%22, %22).append(expected%5Bi%5D);%0A            builder.append(%22 or %22).append(expected%5Bn - 1%5D);%0A         %7D%0A      %7D%0A      em.error(loc, %22type mismatch: found %25s but expected %25s%22, found, builder);%0A   %7D%0A%0A%7D%0A

Add type mismatch error message