Files
sdk/tests/language_2/vm/regress_34644_test.dart
T
Alexander Markov 270fd8e4a8 [vm/aot] Handle annotations on parameters in tree shaker and constant evaluator
Fixes https://github.com/dart-lang/sdk/issues/34644
Issue https://github.com/flutter/flutter/issues/22355

Change-Id: Iaf1e5da9a2d33cf4cd8ea2510cf1faff1a20c886
Reviewed-on: https://dart-review.googlesource.com/c/77673
Auto-Submit: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-10-03 16:16:46 +00:00

35 lines
788 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 annotations on parameters are correctly handled
// in the tree shaker.
// Regression test for https://github.com/dart-lang/sdk/issues/34644.
class ClassUsedInAnnotation1 {
const ClassUsedInAnnotation1();
}
class ClassUsedInAnnotation2 {
const ClassUsedInAnnotation2();
}
abstract class B {
void foo(@ClassUsedInAnnotation1() String param);
}
class C implements B {
void foo(String param) {}
}
typedef void Foo(@ClassUsedInAnnotation2() String param);
B x = new C();
void main() {
x.foo("hi");
Foo y = x.foo;
y("hello");
}