Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(161)

Unified Diff: compiler/java/com/google/dart/compiler/resolver/CompileTimeConstantAnalyzer.java

Issue 10942020: Issue 5215. Invocation identical(x,y) is compile-time constant (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: compiler/java/com/google/dart/compiler/resolver/CompileTimeConstantAnalyzer.java
diff --git a/compiler/java/com/google/dart/compiler/resolver/CompileTimeConstantAnalyzer.java b/compiler/java/com/google/dart/compiler/resolver/CompileTimeConstantAnalyzer.java
index 4ed2b47e0d45bf3c47aee5250cd0a2de0c770694..48e501d75b30f7904609921f8542832618c66778 100644
--- a/compiler/java/com/google/dart/compiler/resolver/CompileTimeConstantAnalyzer.java
+++ b/compiler/java/com/google/dart/compiler/resolver/CompileTimeConstantAnalyzer.java
@@ -597,6 +597,12 @@ public class CompileTimeConstantAnalyzer {
@Override
public Void visitUnqualifiedInvocation(DartUnqualifiedInvocation x) {
+ Element element = x.getElement();
+ // "identical"
+ if (Elements.isFunctionIdentical(element)) {
+ x.visitChildren(this);
+ return null;
+ }
// No need to traverse, always disallowed.
expectedConstant(x);
return null;

Powered by Google App Engine
This is Rietveld 408576698