Files
sdk/pkg/front_end/testcases/expression/main.dart
T
Alexander Aprelev c688d0c0c3 [frontend] When serializing compiled expression proc, clone type params first.
If there are circular references between type parameters and types in the bounds,
currently serialization leaves original type parameters unchanged, which results
in failures to serialize compiled expression procedure.

This CL makes sure to clone all type parameters first, then passes map
with old-to-new type parameters to CloneVisitor.

Bug: https://github.com/dart-lang/sdk/issues/34052
Change-Id: Idf3e6e6e9099f93cdd7e970ab3b21921cdb29178
Reviewed-on: https://dart-review.googlesource.com/75241
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2018-09-20 14:55:59 +00:00

61 lines
1.1 KiB
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.
library main;
import 'dart:io' show File, Process, exit;
int doitstat(int x) => x + 1;
int globalVar = 6;
class A<T> {
const A();
static int doit(int x) => x + 1;
static int staticVar = 3;
int doit_with_this(int x) => x + 1;
}
T id<T>(T x) => x;
class B {
int x;
final int y = 7;
String get z {
return "";
}
void set z(int _) {}
}
class Bound {}
class C<T extends Bound> {}
void hasBound<T extends Bound>() {}
Object k;
class D<T> {
Y id<Y>(Y x) => x;
m(List<T> l) {
assert(l is List<T>);
}
foo() {
List<T> s;
}
}
abstract class Built<V extends Built<V, B>, B extends Builder<V, B>> {}
abstract class Builder<V extends Built<V, B>, B extends Builder<V, B>> {}
class MiddlewareApi<State extends Built<State, StateBuilder>,
StateBuilder extends Builder<State, StateBuilder>> {}
main() {
exit(0);
}