Files
sdk/runtime/tests/vm/dart/generic_field_invocation_test.dart
T
Samir Jindel 30333c508f [vm] Fix bug with generic invocation of fields.
Change-Id: I644f6a66891cf87853b2e7de784c73292bcb2955
Reviewed-on: https://dart-review.googlesource.com/76661
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
2018-09-28 09:50:21 +00:00

21 lines
580 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 verifies that we invoke closure in fields correctly when going
// through the slow NSM path rather than the field invocation dispatchers.
//
// VMOptions=--no-lazy-dispatchers
import 'package:expect/expect.dart';
class C {
dynamic field;
}
main() {
var c = C();
c.field = <T>(T x) => x.hashCode;
Expect.equals(3, c.field<dynamic>(3));
}