b87a479c2b
All generic methods are equipped with one extra named parameter for passing type arguments as a list of type values. Additinally, this change forces strong mode usage for 'dartk' in 'reified_dart'. Strong mode is required for loader to not strip away type arguments from generic methods. In future, a command line argument may be implemented for that (e.g. --generic-methods), if generic method support will land before the strong mode. R=karlklose@google.com Review-Url: https://codereview.chromium.org/2713163002 .
16 lines
361 B
Dart
16 lines
361 B
Dart
// Copyright (c) 2017, 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 generic_methods_simple_test;
|
|
|
|
import 'test_base.dart';
|
|
|
|
bool fun<T>(int s) {
|
|
return true;
|
|
}
|
|
|
|
main() {
|
|
expectTrue(fun<double>(2));
|
|
}
|