forked from flutter/engine
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge commit 'e9f4d5dbb1ea95e7fac59189dc36474953d58e4a' into 'dev'
- Loading branch information
Showing
45 changed files
with
1,377 additions
and
97 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
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
48 changes: 48 additions & 0 deletions
48
pkg/front_end/testcases/general/bug21938.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,48 @@ | ||
library; | ||
// | ||
// Problems in library: | ||
// | ||
// pkg/front_end/testcases/general/bug21938.dart:8:4: Error: The method 'call' isn't defined for the class 'Object'. | ||
// - 'Object' is from 'dart:core'. | ||
// Try correcting the name to the name of an existing method, or defining a method named 'call'. | ||
// x(); | ||
// ^ | ||
// | ||
// pkg/front_end/testcases/general/bug21938.dart:9:4: Error: The method 'call' isn't defined for the class 'Object'. | ||
// - 'Object' is from 'dart:core'. | ||
// Try correcting the name to the name of an existing method, or defining a method named 'call'. | ||
// x(3); | ||
// ^ | ||
// | ||
// pkg/front_end/testcases/general/bug21938.dart:11:5: Error: The method 'call' isn't defined for the class 'Object'. | ||
// - 'Object' is from 'dart:core'. | ||
// Try correcting the name to the name of an existing method, or defining a method named 'call'. | ||
// x.call(); | ||
// ^^^^ | ||
// | ||
import self as self; | ||
import "dart:core" as core; | ||
|
||
static method test() → dynamic { | ||
core::Object* x; | ||
core::Function* f; | ||
invalid-expression "pkg/front_end/testcases/general/bug21938.dart:8:4: Error: The method 'call' isn't defined for the class 'Object'. | ||
- 'Object' is from 'dart:core'. | ||
Try correcting the name to the name of an existing method, or defining a method named 'call'. | ||
x(); | ||
^"; | ||
invalid-expression "pkg/front_end/testcases/general/bug21938.dart:9:4: Error: The method 'call' isn't defined for the class 'Object'. | ||
- 'Object' is from 'dart:core'. | ||
Try correcting the name to the name of an existing method, or defining a method named 'call'. | ||
x(3); | ||
^"; | ||
f.call(5, 2); | ||
invalid-expression "pkg/front_end/testcases/general/bug21938.dart:11:5: Error: The method 'call' isn't defined for the class 'Object'. | ||
- 'Object' is from 'dart:core'. | ||
Try correcting the name to the name of an existing method, or defining a method named 'call'. | ||
x.call(); | ||
^^^^"; | ||
f.call; | ||
f.call(5, 2); | ||
} | ||
static method main() → dynamic {} |
72 changes: 72 additions & 0 deletions
72
pkg/front_end/testcases/general/callable_type_variable.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,72 @@ | ||
library; | ||
// | ||
// Problems in library: | ||
// | ||
// pkg/front_end/testcases/general/callable_type_variable.dart:25:19: Error: Too few positional arguments: 1 required, 0 given. | ||
// var v1 = field(); // error | ||
// ^ | ||
// | ||
// pkg/front_end/testcases/general/callable_type_variable.dart:28:24: Error: Too few positional arguments: 1 required, 0 given. | ||
// var v4 = field.call(); // error | ||
// ^ | ||
// | ||
import self as self; | ||
import "dart:core" as core; | ||
|
||
class Class1<T extends core::Function* = core::Function*> extends core::Object { | ||
generic-covariant-impl field self::Class1::T* field; | ||
constructor •(self::Class1::T* field) → self::Class1<self::Class1::T*>* | ||
: self::Class1::field = field, super core::Object::•() | ||
; | ||
method method() → dynamic { | ||
dynamic v1 = this.{self::Class1::field}.call(); | ||
dynamic v2 = let final core::int* #t1 = 0 in this.{self::Class1::field}.call(#t1); | ||
self::Class1::T* v3 = this.{self::Class1::field}.call; | ||
dynamic v4 = this.{self::Class1::field}.call(); | ||
dynamic v5 = this.{self::Class1::field}.call(0); | ||
} | ||
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode | ||
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf | ||
abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf | ||
abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue | ||
abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse | ||
abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::== | ||
abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode | ||
abstract member-signature method toString() → core::String*; -> core::Object::toString | ||
abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod | ||
abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType | ||
} | ||
class Class2<T extends (core::int*) →* core::String* = (core::int*) →* core::String*> extends core::Object { | ||
generic-covariant-impl field self::Class2::T* field; | ||
constructor •(self::Class2::T* field) → self::Class2<self::Class2::T*>* | ||
: self::Class2::field = field, super core::Object::•() | ||
; | ||
method method() → dynamic { | ||
invalid-type v1 = let final Never* #t2 = invalid-expression "pkg/front_end/testcases/general/callable_type_variable.dart:25:19: Error: Too few positional arguments: 1 required, 0 given. | ||
var v1 = field(); // error | ||
^" in this.{self::Class2::field}.call(); | ||
core::String* v2 = let final core::int* #t3 = 0 in this.{self::Class2::field}.call(#t3); | ||
self::Class2::T* v3 = this.{self::Class2::field}.call; | ||
invalid-type v4 = let final Never* #t4 = invalid-expression "pkg/front_end/testcases/general/callable_type_variable.dart:28:24: Error: Too few positional arguments: 1 required, 0 given. | ||
var v4 = field.call(); // error | ||
^" in this.{self::Class2::field}.call(); | ||
core::String* v5 = this.{self::Class2::field}.call(0); | ||
} | ||
abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode | ||
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf | ||
abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf | ||
abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue | ||
abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse | ||
abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::== | ||
abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode | ||
abstract member-signature method toString() → core::String*; -> core::Object::toString | ||
abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod | ||
abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType | ||
} | ||
static method main() → dynamic {} | ||
|
||
|
||
Extra constant evaluation status: | ||
Evaluated: VariableGet @ org-dartlang-testcase:///callable_type_variable.dart:12:20 -> IntConstant(0) | ||
Evaluated: VariableGet @ org-dartlang-testcase:///callable_type_variable.dart:26:20 -> IntConstant(0) | ||
Extra constant evaluation: evaluated: 38, effectively constant: 2 |
15 changes: 15 additions & 0 deletions
15
pkg/front_end/testcases/generic_metadata/inferred_generic_types_in_arguments_and_bounds.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,15 @@ | ||
// 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. | ||
|
||
class A<X> {} | ||
|
||
A<Y> foo<Y>(Y y) => throw 42; | ||
|
||
test() { | ||
var x = foo(<Z>(Z) => throw 42); | ||
var y = [foo]; | ||
var z = {y.first}; | ||
} | ||
|
||
main() {} |
Oops, something went wrong.