Index: tests/compiler/dart2js/kernel/constructors_test.dart |
diff --git a/tests/compiler/dart2js/kernel/constructors_test.dart b/tests/compiler/dart2js/kernel/constructors_test.dart |
index 1d30c1c548c02003058b1b7c0320a8f1bfccbff6..af38ebd3c2008ed02e3708a062d4e3e1712868ca 100644 |
--- a/tests/compiler/dart2js/kernel/constructors_test.dart |
+++ b/tests/compiler/dart2js/kernel/constructors_test.dart |
@@ -33,6 +33,19 @@ main() { |
}'''; |
return check(code, lookup: defaultConstructorFor('A')); |
}); |
+ |
+test('redirecting constructor with field', () { |
+ String code = ''' |
+class Foo { |
+ final int value; |
+ const Foo({int number: 0}) : this.poodle(number * 2); |
+ const Foo.poodle(this.value); |
+} |
+ |
+main() => new Foo(number: 3); |
+'''; |
+ return check(code, lookup: defaultConstructorFor('Foo')); |
+ }); |
} |
defaultConstructorFor(String className) => (Compiler compiler) { |