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

Unified Diff: pkg/compiler/lib/src/dart_backend/outputter.dart

Issue 867233004: Support constructor declarations in analyzer2dart. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments. Created 5 years, 11 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: pkg/compiler/lib/src/dart_backend/outputter.dart
diff --git a/pkg/compiler/lib/src/dart_backend/outputter.dart b/pkg/compiler/lib/src/dart_backend/outputter.dart
index 7214a18d035a32d439b688d3332782e33c955f2b..07d5a4e0b8791825c6070f1e3633e8e8d5385237 100644
--- a/pkg/compiler/lib/src/dart_backend/outputter.dart
+++ b/pkg/compiler/lib/src/dart_backend/outputter.dart
@@ -287,11 +287,10 @@ class LibraryInfo {
// field names used as named optionals into [fixedMemberNames].
for (final element in resolvedElements) {
if (!element.isConstructor) continue;
- Link<Element> optionalParameters =
- element.functionSignature.optionalParameters;
- for (final optional in optionalParameters) {
- if (!optional.isInitializingFormal) continue;
- fixedDynamicNames.add(optional.name);
+ for (ParameterElement parameter in element.parameters) {
+ if (parameter.isInitializingFormal && parameter.isNamed) {
+ fixedDynamicNames.add(parameter.name);
+ }
}
ClassElement cls = element.enclosingClass;
if (cls != null && cls.isEnumClass) {
@@ -435,7 +434,6 @@ class ElementInfoProcessor implements ElementInfo {
if (element.isClassMember) {
ClassElement enclosingClass = element.enclosingClass;
assert(enclosingClass.isClass);
- assert(enclosingClass.isTopLevel);
assert(shouldOutput(enclosingClass));
addClass(enclosingClass);
classMembers[enclosingClass].add(element);
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/shrinking_reductions.dart ('k') | pkg/compiler/lib/src/dart_backend/placeholder_collector.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698