64584c128a
Moving variance to `js_shared/lib/variance.dart` so we can use the same synced indices when marking variance in both dart2js and ddc. This avoids needing to sync multiple data structures that all represent variance. Bug: https://github.com/dart-lang/sdk/issues/54367 Change-Id: Ia6fda84decd43374c08ed3bd0d0b240071310d9a Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341840 Reviewed-by: Mayank Patke <fishythefish@google.com> Commit-Queue: Kallen Tu <kallentu@google.com> Reviewed-by: Nicholas Shahan <nshahan@google.com>
8 lines
408 B
Dart
8 lines
408 B
Dart
// Copyright (c) 2023, 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.
|
|
|
|
/// Types of variances for type parameters.
|
|
/// This needs to be kept in sync with values of `Variance` in `dart:_rti`.
|
|
enum Variance { legacyCovariant, covariant, contravariant, invariant }
|