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

Unified Diff: pkg/analysis_server/lib/src/analysis_server.dart

Issue 1486663003: Ensure that a complete library element has constants evaluated (issue 24890) (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month 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: pkg/analysis_server/lib/src/analysis_server.dart
diff --git a/pkg/analysis_server/lib/src/analysis_server.dart b/pkg/analysis_server/lib/src/analysis_server.dart
index 6a5ace1f3ee8e8b5febf0bcd558c579adbf97ae9..bc8643294693fcbb8313b162fc2c2300cc73a300 100644
--- a/pkg/analysis_server/lib/src/analysis_server.dart
+++ b/pkg/analysis_server/lib/src/analysis_server.dart
@@ -34,6 +34,7 @@ import 'package:analyzer/src/generated/sdk.dart';
import 'package:analyzer/src/generated/source.dart';
import 'package:analyzer/src/generated/source_io.dart';
import 'package:analyzer/src/generated/utilities_general.dart';
+import 'package:analyzer/src/task/dart.dart';
import 'package:analyzer/src/util/glob.dart';
import 'package:plugin/plugin.dart';
@@ -1321,7 +1322,7 @@ class AnalysisServer {
}
// if library has not been resolved yet, the unit will be resolved later
Source librarySource = librarySources[0];
- if (context.getLibraryElement(librarySource) == null) {
+ if (context.getResult(librarySource, LIBRARY_ELEMENT8) == null) {
Paul Berry 2015/11/30 20:44:35 I'm also concerned about the leakage of LIBRARY_EL
Brian Wilkerson 2015/11/30 21:35:39 As I'm sure you know, the method getLibraryElement
eernst 2015/12/14 10:01:39 DBC: If LIBRARY_ELEMENT8 and maybe other, similarl
Brian Wilkerson 2015/12/14 15:38:26 Absolutely. We had a discussion in the office abou
return null;
}
// if library has been already resolved, resolve unit

Powered by Google App Engine
This is Rietveld 408576698