forked from flutter/engine
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge commit 'ac137cf40ff1d5da95ec8e99653538b2ed6eef5b' into 'dev'
- Loading branch information
Showing
31 changed files
with
690 additions
and
3 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
2 changes: 2 additions & 0 deletions
2
pkg/front_end/testcases/constructor_tearoffs/call_instantiation.dart.textual_outline.expect
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 |
---|---|---|
@@ -1,4 +1,6 @@ | ||
T func<T>(T value) => value; | ||
var funcValue = func; | ||
int Function(int) f = funcValue.call; | ||
int Function(int) g = funcValue.call<int>; | ||
test(Function f) {} | ||
main() {} |
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
10 changes: 10 additions & 0 deletions
10
pkg/front_end/testcases/constructor_tearoffs/dynamic_explicit_instantiation.dart
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,10 @@ | ||
// Copyright (c) 2021, 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. | ||
|
||
test1(dynamic x) => x.foo<int>; // Error. | ||
test2(Never x) => x.foo<int>; // Error. | ||
test3(dynamic x) => x.toString<int>; // Error. | ||
test4(Never x) => x.toString<int>; // Error. | ||
|
||
main() {} |
47 changes: 47 additions & 0 deletions
47
...ront_end/testcases/constructor_tearoffs/dynamic_explicit_instantiation.dart.strong.expect
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,47 @@ | ||
library /*isNonNullableByDefault*/; | ||
// | ||
// Problems in library: | ||
// | ||
// pkg/front_end/testcases/constructor_tearoffs/dynamic_explicit_instantiation.dart:5:26: Error: The static type of the explicit instantiation operand must be a generic function type but is 'dynamic'. | ||
// Try changing the operand or remove the type arguments. | ||
// test1(dynamic x) => x.foo<int>; // Error. | ||
// ^ | ||
// | ||
// pkg/front_end/testcases/constructor_tearoffs/dynamic_explicit_instantiation.dart:6:24: Error: The static type of the explicit instantiation operand must be a generic function type but is 'Never'. | ||
// Try changing the operand or remove the type arguments. | ||
// test2(Never x) => x.foo<int>; // Error. | ||
// ^ | ||
// | ||
// pkg/front_end/testcases/constructor_tearoffs/dynamic_explicit_instantiation.dart:7:31: Error: The static type of the explicit instantiation operand must be a generic function type but is 'String Function()'. | ||
// Try changing the operand or remove the type arguments. | ||
// test3(dynamic x) => x.toString<int>; // Error. | ||
// ^ | ||
// | ||
// pkg/front_end/testcases/constructor_tearoffs/dynamic_explicit_instantiation.dart:8:29: Error: The static type of the explicit instantiation operand must be a generic function type but is 'Never'. | ||
// Try changing the operand or remove the type arguments. | ||
// test4(Never x) => x.toString<int>; // Error. | ||
// ^ | ||
// | ||
import self as self; | ||
|
||
static method test1(dynamic x) → dynamic | ||
return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/dynamic_explicit_instantiation.dart:5:26: Error: The static type of the explicit instantiation operand must be a generic function type but is 'dynamic'. | ||
Try changing the operand or remove the type arguments. | ||
test1(dynamic x) => x.foo<int>; // Error. | ||
^"; | ||
static method test2(Never x) → dynamic | ||
return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/dynamic_explicit_instantiation.dart:6:24: Error: The static type of the explicit instantiation operand must be a generic function type but is 'Never'. | ||
Try changing the operand or remove the type arguments. | ||
test2(Never x) => x.foo<int>; // Error. | ||
^"; | ||
static method test3(dynamic x) → dynamic | ||
return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/dynamic_explicit_instantiation.dart:7:31: Error: The static type of the explicit instantiation operand must be a generic function type but is 'String Function()'. | ||
Try changing the operand or remove the type arguments. | ||
test3(dynamic x) => x.toString<int>; // Error. | ||
^"; | ||
static method test4(Never x) → dynamic | ||
return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/dynamic_explicit_instantiation.dart:8:29: Error: The static type of the explicit instantiation operand must be a generic function type but is 'Never'. | ||
Try changing the operand or remove the type arguments. | ||
test4(Never x) => x.toString<int>; // Error. | ||
^"; | ||
static method main() → dynamic {} |
47 changes: 47 additions & 0 deletions
47
...tcases/constructor_tearoffs/dynamic_explicit_instantiation.dart.strong.transformed.expect
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,47 @@ | ||
library /*isNonNullableByDefault*/; | ||
// | ||
// Problems in library: | ||
// | ||
// pkg/front_end/testcases/constructor_tearoffs/dynamic_explicit_instantiation.dart:5:26: Error: The static type of the explicit instantiation operand must be a generic function type but is 'dynamic'. | ||
// Try changing the operand or remove the type arguments. | ||
// test1(dynamic x) => x.foo<int>; // Error. | ||
// ^ | ||
// | ||
// pkg/front_end/testcases/constructor_tearoffs/dynamic_explicit_instantiation.dart:6:24: Error: The static type of the explicit instantiation operand must be a generic function type but is 'Never'. | ||
// Try changing the operand or remove the type arguments. | ||
// test2(Never x) => x.foo<int>; // Error. | ||
// ^ | ||
// | ||
// pkg/front_end/testcases/constructor_tearoffs/dynamic_explicit_instantiation.dart:7:31: Error: The static type of the explicit instantiation operand must be a generic function type but is 'String Function()'. | ||
// Try changing the operand or remove the type arguments. | ||
// test3(dynamic x) => x.toString<int>; // Error. | ||
// ^ | ||
// | ||
// pkg/front_end/testcases/constructor_tearoffs/dynamic_explicit_instantiation.dart:8:29: Error: The static type of the explicit instantiation operand must be a generic function type but is 'Never'. | ||
// Try changing the operand or remove the type arguments. | ||
// test4(Never x) => x.toString<int>; // Error. | ||
// ^ | ||
// | ||
import self as self; | ||
|
||
static method test1(dynamic x) → dynamic | ||
return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/dynamic_explicit_instantiation.dart:5:26: Error: The static type of the explicit instantiation operand must be a generic function type but is 'dynamic'. | ||
Try changing the operand or remove the type arguments. | ||
test1(dynamic x) => x.foo<int>; // Error. | ||
^"; | ||
static method test2(Never x) → dynamic | ||
return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/dynamic_explicit_instantiation.dart:6:24: Error: The static type of the explicit instantiation operand must be a generic function type but is 'Never'. | ||
Try changing the operand or remove the type arguments. | ||
test2(Never x) => x.foo<int>; // Error. | ||
^"; | ||
static method test3(dynamic x) → dynamic | ||
return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/dynamic_explicit_instantiation.dart:7:31: Error: The static type of the explicit instantiation operand must be a generic function type but is 'String Function()'. | ||
Try changing the operand or remove the type arguments. | ||
test3(dynamic x) => x.toString<int>; // Error. | ||
^"; | ||
static method test4(Never x) → dynamic | ||
return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/dynamic_explicit_instantiation.dart:8:29: Error: The static type of the explicit instantiation operand must be a generic function type but is 'Never'. | ||
Try changing the operand or remove the type arguments. | ||
test4(Never x) => x.toString<int>; // Error. | ||
^"; | ||
static method main() → dynamic {} |
5 changes: 5 additions & 0 deletions
5
...testcases/constructor_tearoffs/dynamic_explicit_instantiation.dart.textual_outline.expect
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,5 @@ | ||
test1(dynamic x) => x.foo<int>; | ||
test2(Never x) => x.foo<int>; | ||
test3(dynamic x) => x.toString<int>; | ||
test4(Never x) => x.toString<int>; | ||
main() {} |
47 changes: 47 additions & 0 deletions
47
pkg/front_end/testcases/constructor_tearoffs/dynamic_explicit_instantiation.dart.weak.expect
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,47 @@ | ||
library /*isNonNullableByDefault*/; | ||
// | ||
// Problems in library: | ||
// | ||
// pkg/front_end/testcases/constructor_tearoffs/dynamic_explicit_instantiation.dart:5:26: Error: The static type of the explicit instantiation operand must be a generic function type but is 'dynamic'. | ||
// Try changing the operand or remove the type arguments. | ||
// test1(dynamic x) => x.foo<int>; // Error. | ||
// ^ | ||
// | ||
// pkg/front_end/testcases/constructor_tearoffs/dynamic_explicit_instantiation.dart:6:24: Error: The static type of the explicit instantiation operand must be a generic function type but is 'Never'. | ||
// Try changing the operand or remove the type arguments. | ||
// test2(Never x) => x.foo<int>; // Error. | ||
// ^ | ||
// | ||
// pkg/front_end/testcases/constructor_tearoffs/dynamic_explicit_instantiation.dart:7:31: Error: The static type of the explicit instantiation operand must be a generic function type but is 'String Function()'. | ||
// Try changing the operand or remove the type arguments. | ||
// test3(dynamic x) => x.toString<int>; // Error. | ||
// ^ | ||
// | ||
// pkg/front_end/testcases/constructor_tearoffs/dynamic_explicit_instantiation.dart:8:29: Error: The static type of the explicit instantiation operand must be a generic function type but is 'Never'. | ||
// Try changing the operand or remove the type arguments. | ||
// test4(Never x) => x.toString<int>; // Error. | ||
// ^ | ||
// | ||
import self as self; | ||
|
||
static method test1(dynamic x) → dynamic | ||
return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/dynamic_explicit_instantiation.dart:5:26: Error: The static type of the explicit instantiation operand must be a generic function type but is 'dynamic'. | ||
Try changing the operand or remove the type arguments. | ||
test1(dynamic x) => x.foo<int>; // Error. | ||
^"; | ||
static method test2(Never x) → dynamic | ||
return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/dynamic_explicit_instantiation.dart:6:24: Error: The static type of the explicit instantiation operand must be a generic function type but is 'Never'. | ||
Try changing the operand or remove the type arguments. | ||
test2(Never x) => x.foo<int>; // Error. | ||
^"; | ||
static method test3(dynamic x) → dynamic | ||
return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/dynamic_explicit_instantiation.dart:7:31: Error: The static type of the explicit instantiation operand must be a generic function type but is 'String Function()'. | ||
Try changing the operand or remove the type arguments. | ||
test3(dynamic x) => x.toString<int>; // Error. | ||
^"; | ||
static method test4(Never x) → dynamic | ||
return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/dynamic_explicit_instantiation.dart:8:29: Error: The static type of the explicit instantiation operand must be a generic function type but is 'Never'. | ||
Try changing the operand or remove the type arguments. | ||
test4(Never x) => x.toString<int>; // Error. | ||
^"; | ||
static method main() → dynamic {} |
13 changes: 13 additions & 0 deletions
13
...nd/testcases/constructor_tearoffs/dynamic_explicit_instantiation.dart.weak.outline.expect
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,13 @@ | ||
library /*isNonNullableByDefault*/; | ||
import self as self; | ||
|
||
static method test1(dynamic x) → dynamic | ||
; | ||
static method test2(Never x) → dynamic | ||
; | ||
static method test3(dynamic x) → dynamic | ||
; | ||
static method test4(Never x) → dynamic | ||
; | ||
static method main() → dynamic | ||
; |
47 changes: 47 additions & 0 deletions
47
...estcases/constructor_tearoffs/dynamic_explicit_instantiation.dart.weak.transformed.expect
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,47 @@ | ||
library /*isNonNullableByDefault*/; | ||
// | ||
// Problems in library: | ||
// | ||
// pkg/front_end/testcases/constructor_tearoffs/dynamic_explicit_instantiation.dart:5:26: Error: The static type of the explicit instantiation operand must be a generic function type but is 'dynamic'. | ||
// Try changing the operand or remove the type arguments. | ||
// test1(dynamic x) => x.foo<int>; // Error. | ||
// ^ | ||
// | ||
// pkg/front_end/testcases/constructor_tearoffs/dynamic_explicit_instantiation.dart:6:24: Error: The static type of the explicit instantiation operand must be a generic function type but is 'Never'. | ||
// Try changing the operand or remove the type arguments. | ||
// test2(Never x) => x.foo<int>; // Error. | ||
// ^ | ||
// | ||
// pkg/front_end/testcases/constructor_tearoffs/dynamic_explicit_instantiation.dart:7:31: Error: The static type of the explicit instantiation operand must be a generic function type but is 'String Function()'. | ||
// Try changing the operand or remove the type arguments. | ||
// test3(dynamic x) => x.toString<int>; // Error. | ||
// ^ | ||
// | ||
// pkg/front_end/testcases/constructor_tearoffs/dynamic_explicit_instantiation.dart:8:29: Error: The static type of the explicit instantiation operand must be a generic function type but is 'Never'. | ||
// Try changing the operand or remove the type arguments. | ||
// test4(Never x) => x.toString<int>; // Error. | ||
// ^ | ||
// | ||
import self as self; | ||
|
||
static method test1(dynamic x) → dynamic | ||
return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/dynamic_explicit_instantiation.dart:5:26: Error: The static type of the explicit instantiation operand must be a generic function type but is 'dynamic'. | ||
Try changing the operand or remove the type arguments. | ||
test1(dynamic x) => x.foo<int>; // Error. | ||
^"; | ||
static method test2(Never x) → dynamic | ||
return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/dynamic_explicit_instantiation.dart:6:24: Error: The static type of the explicit instantiation operand must be a generic function type but is 'Never'. | ||
Try changing the operand or remove the type arguments. | ||
test2(Never x) => x.foo<int>; // Error. | ||
^"; | ||
static method test3(dynamic x) → dynamic | ||
return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/dynamic_explicit_instantiation.dart:7:31: Error: The static type of the explicit instantiation operand must be a generic function type but is 'String Function()'. | ||
Try changing the operand or remove the type arguments. | ||
test3(dynamic x) => x.toString<int>; // Error. | ||
^"; | ||
static method test4(Never x) → dynamic | ||
return invalid-expression "pkg/front_end/testcases/constructor_tearoffs/dynamic_explicit_instantiation.dart:8:29: Error: The static type of the explicit instantiation operand must be a generic function type but is 'Never'. | ||
Try changing the operand or remove the type arguments. | ||
test4(Never x) => x.toString<int>; // Error. | ||
^"; | ||
static method main() → dynamic {} |
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
Oops, something went wrong.