Index: pkg/compiler/lib/src/diagnostics/invariant.dart |
diff --git a/pkg/compiler/lib/src/diagnostics/invariant.dart b/pkg/compiler/lib/src/diagnostics/invariant.dart |
index b6d4d0faf09252cb99916a56392cd9555a1de8fc..349d89baf8bb377f62cc1cd162d578ab20400ed0 100644 |
--- a/pkg/compiler/lib/src/diagnostics/invariant.dart |
+++ b/pkg/compiler/lib/src/diagnostics/invariant.dart |
@@ -48,6 +48,10 @@ bool invariant(Spannable spannable, var condition, {var message: null}) { |
} |
if (condition is Function){ |
condition = condition(); |
+ if (condition is String) { |
+ message = condition; |
+ condition = false; |
+ } |
} |
if (!condition) { |
if (message is Function) { |