You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It was decided in #31953 that the partial instantiation operator needs to check the bounds of type arguments at the point of partial instantiation, rather than waiting until the resulting closure is called. The VM is currently being updated with the correct behavior, but DDK also has the incorrect behavior. For example, the following test should pass:
// 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 checks that necessary type argument bounds checks are performed// eagerly during partial instantiation, rather than being delayed until the// partially instantiated closure is invoked.import"package:expect/expect.dart";
classC<T> {
voidfoo<SextendsT>(S x) {}
}
voidmain() {
C<Object> c =C<int>();
voidFunction(String) fn;
Expect.throwsTypeError(() {
fn = c.foo;
});
}
I've suggested P1 priority for this issue because fixing the semantics here is a breaking change.
The text was updated successfully, but these errors were encountered:
DDC probably has the same behavior with either Analyzer or Kernel backend. If that's true we'd have to fix both.
(regarding priority: I don't think this would be P1 per the guidelines? https://github.com/dart-lang/sdk/wiki/How-the-issue-tracker-works ... as this is not "A single project is unusable or has many test failures". Implicit instantiation is fairly obscure, and the only problem with the current behavior is throwing an exception later than we should. But it seems like something we should fix by the 2.1 milestone for consistency.)
jmesserly
removed
the
P1
A high priority bug; for example, a single project is unusable or has many test failures
label
Aug 29, 2018
Thanks for linking me to that page, I wasn't aware that we had general priority guidelines across teams.
Note that implicit instantiation is not as obscure as it may seem. For example, this external customer hit a performance issue with it in the VM in Dart 2.0: #34090.
Note that implicit instantiation is not as obscure as it may seem. For example, this external customer hit a performance issue with it in the VM in Dart 2.0: #34090.
It was decided in #31953 that the partial instantiation operator needs to check the bounds of type arguments at the point of partial instantiation, rather than waiting until the resulting closure is called. The VM is currently being updated with the correct behavior, but DDK also has the incorrect behavior. For example, the following test should pass:
I've suggested P1 priority for this issue because fixing the semantics here is a breaking change.
The text was updated successfully, but these errors were encountered: