dart-sdk/tests/language_2/issue34489_test.dart
Paul Berry 9ca0d26744 Properly type infer references to class type parameters.
Fixes #34489.

Change-Id: I7dca72366dd9259e6a0f39aaa07202943eb9f54d
Reviewed-on: https://dart-review.googlesource.com/c/81180
Commit-Queue: Paul Berry <paulberry@google.com>
Auto-Submit: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-10-23 04:24:53 +00:00

12 lines
313 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.
class C<T> {
var field = T;
}
main() {
new C().field = 'bad'; //# 01: compile-time error
}