-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Type check field initializers in the correct context.
Closes #27104 R=sigmund@google.com Review URL: https://codereview.chromium.org/2250433007 .
- Loading branch information
1 parent
a730f03
commit d4d5a48
Showing
2 changed files
with
41 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | ||
// for details. All rights reserved. Use of this source code is governed by a | ||
// BSD-style license that can be found in the LICENSE file. | ||
|
||
/// Checks that we can correctly typecheck multi-variable declarations on fields | ||
/// and top-levels. This is also a regression test for Issue 27401. | ||
class A {} | ||
|
||
A a = new A(), b = new A(); | ||
|
||
class B { | ||
A a = new A(), b = new A(); | ||
} | ||
|
||
main() => [a, b, new B().a, new B().b]; |