@@ -197,7 +197,11 @@ public class NewTypeInference implements CompilerPass {
197
197
public static class WarningReporter {
198
198
AbstractCompiler compiler ;
199
199
WarningReporter (AbstractCompiler compiler ) { this .compiler = compiler ; }
200
- void add (JSError warning ) { compiler .report (warning ); }
200
+ void add (JSError warning ) {
201
+ if (!JSType .mockToString ) {
202
+ compiler .report (warning );
203
+ }
204
+ }
201
205
}
202
206
203
207
private WarningReporter warnings ;
@@ -213,9 +217,10 @@ public static class WarningReporter {
213
217
static final String GETTER_PREFIX = "%getter_fun" ;
214
218
static final String SETTER_PREFIX = "%setter_fun" ;
215
219
private JSType arrayType , regexpType ; // used for array and regexp literals
216
- private static boolean debugging = false ;
217
220
private final boolean isClosurePassOn ;
218
- // Used for profiling during development
221
+
222
+ // Used only for development
223
+ private static boolean showDebuggingPrints = false ;
219
224
static boolean measureMem = false ;
220
225
private static long peakMem = 0 ;
221
226
@@ -278,7 +283,7 @@ private boolean isArrayType(JSType t) {
278
283
}
279
284
280
285
private static void println (Object ... objs ) {
281
- if (debugging ) {
286
+ if (showDebuggingPrints ) {
282
287
StringBuilder b = new StringBuilder ();
283
288
for (Object obj : objs ) {
284
289
b .append (obj == null ? "null" : obj .toString ());
0 commit comments