-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[cfe] Add implicit as and type arguments to static_type_test
+ add test for issue 37439 showing Change-Id: I3b42a5a05df5a89f5bd8255a3f305a2c2caa0176 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112087 Reviewed-by: Dmitry Stefantsov <dmitryas@google.com> Commit-Queue: Johnni Winther <johnniwinther@google.com>
- Loading branch information
1 parent
7283827
commit 08205fd
Showing
4 changed files
with
102 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Copyright (c) 2019, 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. | ||
|
||
class A {} | ||
|
||
class B extends A {} | ||
|
||
Future<T> func1<T extends A>(T t) async { | ||
// TODO(37439): We should infer 'T' instead of '<bottom>'. | ||
return /*invoke: <bottom>*/ func2/*<<bottom>>*/(/*as: <bottom>*/ /*T*/ t); | ||
} | ||
|
||
T func2<T extends A>(T t) => /*T*/ t; | ||
|
||
main() async { | ||
/*B*/ await /*invoke: Future<B>*/ func1/*<B>*/(/*B*/ B()); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters