blob: 0428aed524068bee40e2a95b0bf496c446aa3bd1 [file]
library;
//
// Problems in library:
//
// pkg/front_end/testcases/general/named_function_scope.dart:26:13: Error: A function expression can't have a name.
// var x = T() {};
// ^
//
// pkg/front_end/testcases/general/named_function_scope.dart:29:5: Error: Local variable 'V' can't be referenced before it is declared.
// V v;
// ^
// pkg/front_end/testcases/general/named_function_scope.dart:31:9: Context: This is the declaration of the variable 'V'.
// var V;
// ^
//
// pkg/front_end/testcases/general/named_function_scope.dart:34:5: Error: Local variable 'V' can't be referenced before it is declared.
// V v;
// ^
// pkg/front_end/testcases/general/named_function_scope.dart:36:9: Context: This is the declaration of the variable 'V'.
// var V = null;
// ^
//
// pkg/front_end/testcases/general/named_function_scope.dart:41:15: Error: A function expression can't have a name.
// var x = T T() {};
// ^
//
// pkg/front_end/testcases/general/named_function_scope.dart:41:13: Error: Local variable 'T' can't be referenced before it is declared.
// var x = T T() {};
// ^
// pkg/front_end/testcases/general/named_function_scope.dart:41:15: Context: This is the declaration of the variable 'T'.
// var x = T T() {};
// ^
//
// pkg/front_end/testcases/general/named_function_scope.dart:47:5: Error: Local variable 'V' can't be referenced before it is declared.
// V V;
// ^
// pkg/front_end/testcases/general/named_function_scope.dart:47:7: Context: This is the declaration of the variable 'V'.
// V V;
// ^
//
// pkg/front_end/testcases/general/named_function_scope.dart:52:13: Error: A function expression can't have a name.
// var x = T<T>() {};
// ^
//
// pkg/front_end/testcases/general/named_function_scope.dart:55:5: Error: Local variable 'T' can't be referenced before it is declared.
// T t;
// ^
// pkg/front_end/testcases/general/named_function_scope.dart:56:7: Context: This is the declaration of the variable 'T'.
// T T() => throw '';
// ^
//
// pkg/front_end/testcases/general/named_function_scope.dart:56:5: Error: Local variable 'T' can't be referenced before it is declared.
// T T() => throw '';
// ^
// pkg/front_end/testcases/general/named_function_scope.dart:56:7: Context: This is the declaration of the variable 'T'.
// T T() => throw '';
// ^
//
// pkg/front_end/testcases/general/named_function_scope.dart:59:5: Error: Local variable 'T' can't be referenced before it is declared.
// T T() => throw '';
// ^
// pkg/front_end/testcases/general/named_function_scope.dart:59:7: Context: This is the declaration of the variable 'T'.
// T T() => throw '';
// ^
//
// pkg/front_end/testcases/general/named_function_scope.dart:62:5: Error: Local variable 'T' can't be referenced before it is declared.
// T t;
// ^
// pkg/front_end/testcases/general/named_function_scope.dart:63:7: Context: This is the declaration of the variable 'T'.
// T T(T t) => t;
// ^
//
// pkg/front_end/testcases/general/named_function_scope.dart:63:5: Error: Local variable 'T' can't be referenced before it is declared.
// T T(T t) => t;
// ^
// pkg/front_end/testcases/general/named_function_scope.dart:63:7: Context: This is the declaration of the variable 'T'.
// T T(T t) => t;
// ^
//
// pkg/front_end/testcases/general/named_function_scope.dart:66:5: Error: Local variable 'T' can't be referenced before it is declared.
// T T(T t) => t;
// ^
// pkg/front_end/testcases/general/named_function_scope.dart:66:7: Context: This is the declaration of the variable 'T'.
// T T(T t) => t;
// ^
//
// pkg/front_end/testcases/general/named_function_scope.dart:69:12: Error: 'T' isn't a type.
// void T(T t) {}
// ^
//
// pkg/front_end/testcases/general/named_function_scope.dart:41:13: Error: A non-null value must be returned since the return type 'T' doesn't allow null.
// - 'T' is from 'pkg/front_end/testcases/general/named_function_scope.dart'.
// var x = T T() {};
// ^
//
import self as self;
import "dart:core" as core;
class T extends core::Object {
synthetic constructor •() → self::T
: super core::Object::•()
;
}
class V extends core::Object {
synthetic constructor •() → self::V
: super core::Object::•()
;
}
static method test() → dynamic {
self::T t;
self::V v;
{
function T() → Null {}
}
{
dynamic v##1;
}
{
self::T t##1;
invalid-type x = block {
function T##1() → Null {}
} =>invalid-expression "pkg/front_end/testcases/general/named_function_scope.dart:26:13: Error: A function expression can't have a name.
var x = T() {};
^";
}
{
self::V v##2;
dynamic V;
}
{
self::V v##3;
has-declared-initializer dynamic V##1 = null;
}
{
invalid-type x##1 = block {
function T##2() → self::T {
return invalid-expression "pkg/front_end/testcases/general/named_function_scope.dart:41:13: Error: A non-null value must be returned since the return type 'T' doesn't allow null.
- 'T' is from 'pkg/front_end/testcases/general/named_function_scope.dart'.
var x = T T() {};
^" in null;
}
} =>invalid-expression "pkg/front_end/testcases/general/named_function_scope.dart:41:13: Error: A function expression can't have a name.
var x = T T() {};
^";
}
{
self::V V##2;
}
{
invalid-type x##2 = block {
function T##3<T extends core::Object? = dynamic>() → Null {}
} =>invalid-expression "pkg/front_end/testcases/general/named_function_scope.dart:52:13: Error: A function expression can't have a name.
var x = T<T>() {};
^";
}
{
self::T t##2;
function T##4() → self::T
return throw "";
}
{
function T##5() → self::T
return throw "";
}
{
self::T t##3;
function T##6(self::T t##4) → self::T
return t##4;
}
{
function T##7(self::T t##5) → self::T
return t##5;
}
{
function T##8(invalid-type t##6) → void {}
}
}
static method main() → void {}