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

Unified Diff: sdk/lib/_internal/compiler/implementation/types/simple_types_inferrer.dart

Issue 12425006: Fix two bugs in the simple types inferrer: (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 10 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
« no previous file with comments | « no previous file | tests/compiler/dart2js/simple_inferrer_final_field2_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/implementation/types/simple_types_inferrer.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/types/simple_types_inferrer.dart (revision 19484)
+++ sdk/lib/_internal/compiler/implementation/types/simple_types_inferrer.dart (working copy)
@@ -271,7 +271,10 @@
compiler.enqueuer.resolution.seenClasses.forEach((ClassElement cls) {
int constructorCount = 0;
cls.forEachMember((_, member) {
- if (member.isGenerativeConstructor()) constructorCount++;
+ if (member.isGenerativeConstructor()
+ && compiler.enqueuer.resolution.isProcessed(member)) {
+ constructorCount++;
+ }
});
classInfoForFinalFields[cls.implementation] =
new ClassInfoForFinalFields(constructorCount);
@@ -755,7 +758,7 @@
// We don't track argument types yet, so just set the fields
// and parameters as dynamic.
if (element.kind == ElementKind.FIELD_PARAMETER
- && element.modifiers.isFinal()) {
+ && element.fieldElement.modifiers.isFinal()) {
inferrer.recordFinalFieldType(
analyzedElement, element.fieldElement, compiler.dynamicClass);
} else {
« no previous file with comments | « no previous file | tests/compiler/dart2js/simple_inferrer_final_field2_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698