Files
sdk/pkg/front_end/testcases/circularity-via-initializing-formal.dart
T
G?nter Z?chbauer 2da0b9f4f1 fix some typos
Closes #34738
https://github.com/dart-lang/sdk/pull/34738

GitOrigin-RevId: d211bbacfe65355cf7304c990ffb6c79d7a229cf
Change-Id: If690e6d378e543b300e1f6a353ceae73e39c29db
Reviewed-on: https://dart-review.googlesource.com/c/78900
Reviewed-by: Alexander Thomas <athom@google.com>
2018-10-10 19:15:30 +00:00

19 lines
667 B
Dart

// Copyright (c) 2018, 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.
// This test is intended to trigger a circular top-level type-inference
// dependency involving an initializing formal where the circularity is detected
// when inferring the type of the constructor.
//
// The compiler should generate an error message and it should be properly
// formatted including offset and length of the constructor.
var x = new C._circular(null);
class C {
var f = new C._circular(null);
C._circular(this.f);
}
main() {}