blob: 550a03e8301970e24068a5a155a35e4223ae256a [file] [log] [blame]
// Copyright (c) 2019, 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.
/// Catch illegal access to 'this' in initialized instance fields.
class A {
var x = 5;
var arr = [x]; // Illegal access to 'this'.
// ^
// [cfe] Can't access 'this' in a field initializer to read 'x'.
void main() {