blob: f36f2eaaf6f85102000632226bbc6ce27c9d2db6 [file] [log] [blame]
library /*isNonNullableByDefault*/;
//
// 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:31:9: Error: Can't declare 'V' because it was already used in this scope.
// var V;
// ^
// pkg/front_end/testcases/general/named_function_scope.dart:29:5: Context: Previous use of 'V'.
// V v;
// ^
//
// pkg/front_end/testcases/general/named_function_scope.dart:36:9: Error: Can't declare 'V' because it was already used in this scope.
// var V = null;
// ^
// pkg/front_end/testcases/general/named_function_scope.dart:34:5: Context: Previous use of 'V'.
// V v;
// ^
//
// 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:15: Error: Can't declare 'T' because it was already used in this scope.
// var x = T T() {};
// ^
// pkg/front_end/testcases/general/named_function_scope.dart:41:13: Context: Previous use of 'T'.
// var x = T T() {};
// ^
//
// pkg/front_end/testcases/general/named_function_scope.dart:47:7: Error: Can't declare 'V' because it was already used in this scope.
// V V;
// ^
// pkg/front_end/testcases/general/named_function_scope.dart:47:5: Context: Previous use of '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:52:13: Error: 'T' is already declared in this scope.
// var x = T<T>() {};
// ^
// pkg/front_end/testcases/general/named_function_scope.dart:52:15: Context: Previous declaration of 'T'.
// var x = T<T>() {};
// ^
//
// pkg/front_end/testcases/general/named_function_scope.dart:56:7: Error: Can't declare 'T' because it was already used in this scope.
// T T() => throw '';
// ^
// pkg/front_end/testcases/general/named_function_scope.dart:55:5: Context: Previous use of 'T'.
// T t;
// ^
//
// pkg/front_end/testcases/general/named_function_scope.dart:59:7: Error: Can't declare 'T' because it was already used in this scope.
// T T() => throw '';
// ^
// pkg/front_end/testcases/general/named_function_scope.dart:59:5: Context: Previous use of 'T'.
// T T() => throw '';
// ^
//
// pkg/front_end/testcases/general/named_function_scope.dart:63:7: Error: Can't declare 'T' because it was already used in this scope.
// T T(T t) => t;
// ^
// pkg/front_end/testcases/general/named_function_scope.dart:62:5: Context: Previous use of 'T'.
// T t;
// ^
//
// pkg/front_end/testcases/general/named_function_scope.dart:66:7: Error: Can't declare 'T' because it was already used in this scope.
// T T(T t) => t;
// ^
// pkg/front_end/testcases/general/named_function_scope.dart:66:5: Context: Previous use of '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;
}
{
self::T t;
invalid-type x = block {
function T() 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;
invalid-type V = invalid-expression "pkg/front_end/testcases/general/named_function_scope.dart:31:9: Error: Can't declare 'V' because it was already used in this scope.
var V;
^";
}
{
self::V v;
invalid-type V = invalid-expression "pkg/front_end/testcases/general/named_function_scope.dart:36:9: Error: Can't declare 'V' because it was already used in this scope.
var V = null;
^" in null;
}
{
invalid-type x = block {
{
invalid-expression "pkg/front_end/testcases/general/named_function_scope.dart:41:15: Error: Can't declare 'T' because it was already used in this scope.
var x = T T() {};
^";
function T() 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 = invalid-expression "pkg/front_end/testcases/general/named_function_scope.dart:47:7: Error: Can't declare 'V' because it was already used in this scope.
V V;
^";
}
{
invalid-type x = block {
{
invalid-expression "pkg/front_end/testcases/general/named_function_scope.dart:52:13: Error: 'T' is already declared in this scope.
var x = T<T>() {};
^";
function T<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;
{
invalid-expression "pkg/front_end/testcases/general/named_function_scope.dart:56:7: Error: Can't declare 'T' because it was already used in this scope.
T T() => throw '';
^";
function T() self::T
return throw "";
}
}
{
{
invalid-expression "pkg/front_end/testcases/general/named_function_scope.dart:59:7: Error: Can't declare 'T' because it was already used in this scope.
T T() => throw '';
^";
function T() self::T
return throw "";
}
}
{
self::T t;
{
invalid-expression "pkg/front_end/testcases/general/named_function_scope.dart:63:7: Error: Can't declare 'T' because it was already used in this scope.
T T(T t) => t;
^";
function T(self::T t) self::T
return t;
}
}
{
{
invalid-expression "pkg/front_end/testcases/general/named_function_scope.dart:66:7: Error: Can't declare 'T' because it was already used in this scope.
T T(T t) => t;
^";
function T(self::T t) self::T
return t;
}
}
{
function T(invalid-type t) void {}
}
}
static method main() void {}