blob: 969df35bed91b2d587e529b7c85a85f82738c389 [file] [log] [blame]
library;
//
// Problems in library:
//
// pkg/front_end/testcases/general_nnbd_opt_out/named_function_scope.dart:28:13: Error: A function expression can't have a name.
// var x = T() {};
// ^
//
// pkg/front_end/testcases/general_nnbd_opt_out/named_function_scope.dart:33:9: Error: Can't declare 'V' because it was already used in this scope.
// var V;
// ^
// pkg/front_end/testcases/general_nnbd_opt_out/named_function_scope.dart:31:5: Context: Previous use of 'V'.
// V v;
// ^
//
// pkg/front_end/testcases/general_nnbd_opt_out/named_function_scope.dart:38:9: Error: Can't declare 'V' because it was already used in this scope.
// var V = null;
// ^
// pkg/front_end/testcases/general_nnbd_opt_out/named_function_scope.dart:36:5: Context: Previous use of 'V'.
// V v;
// ^
//
// pkg/front_end/testcases/general_nnbd_opt_out/named_function_scope.dart:43:15: Error: A function expression can't have a name.
// var x = T T() {};
// ^
//
// pkg/front_end/testcases/general_nnbd_opt_out/named_function_scope.dart:43:15: Error: Can't declare 'T' because it was already used in this scope.
// var x = T T() {};
// ^
// pkg/front_end/testcases/general_nnbd_opt_out/named_function_scope.dart:43:13: Context: Previous use of 'T'.
// var x = T T() {};
// ^
//
// pkg/front_end/testcases/general_nnbd_opt_out/named_function_scope.dart:49:7: Error: Can't declare 'V' because it was already used in this scope.
// V V;
// ^
// pkg/front_end/testcases/general_nnbd_opt_out/named_function_scope.dart:49:5: Context: Previous use of 'V'.
// V V;
// ^
//
// pkg/front_end/testcases/general_nnbd_opt_out/named_function_scope.dart:54:13: Error: A function expression can't have a name.
// var x = T<T>() {};
// ^
//
// pkg/front_end/testcases/general_nnbd_opt_out/named_function_scope.dart:54:13: Error: 'T' is already declared in this scope.
// var x = T<T>() {};
// ^
// pkg/front_end/testcases/general_nnbd_opt_out/named_function_scope.dart:54:15: Context: Previous declaration of 'T'.
// var x = T<T>() {};
// ^
//
// pkg/front_end/testcases/general_nnbd_opt_out/named_function_scope.dart:58:7: Error: Can't declare 'T' because it was already used in this scope.
// T T() {}
// ^
// pkg/front_end/testcases/general_nnbd_opt_out/named_function_scope.dart:57:5: Context: Previous use of 'T'.
// T t;
// ^
//
// pkg/front_end/testcases/general_nnbd_opt_out/named_function_scope.dart:61:7: Error: Can't declare 'T' because it was already used in this scope.
// T T() {}
// ^
// pkg/front_end/testcases/general_nnbd_opt_out/named_function_scope.dart:61:5: Context: Previous use of 'T'.
// T T() {}
// ^
//
// pkg/front_end/testcases/general_nnbd_opt_out/named_function_scope.dart:65:7: Error: Can't declare 'T' because it was already used in this scope.
// T T(T t) {}
// ^
// pkg/front_end/testcases/general_nnbd_opt_out/named_function_scope.dart:64:5: Context: Previous use of 'T'.
// T t;
// ^
//
// pkg/front_end/testcases/general_nnbd_opt_out/named_function_scope.dart:68:7: Error: Can't declare 'T' because it was already used in this scope.
// T T(T t) {}
// ^
// pkg/front_end/testcases/general_nnbd_opt_out/named_function_scope.dart:68:5: Context: Previous use of 'T'.
// T T(T t) {}
// ^
//
// pkg/front_end/testcases/general_nnbd_opt_out/named_function_scope.dart:71:12: Error: 'T' isn't a type.
// void T(T t) {}
// ^
//
import self as self;
import "dart:core" as core;
class T extends core::Object {
synthetic constructor •() self::T*
: super core::Object::•()
;
abstract member-signature get _identityHashCode() core::int*;
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) core::bool*;
abstract member-signature method _simpleInstanceOf(dynamic type) core::bool*;
abstract member-signature method _simpleInstanceOfTrue(dynamic type) core::bool*;
abstract member-signature method _simpleInstanceOfFalse(dynamic type) core::bool*;
abstract member-signature operator ==(dynamic other) core::bool*;
abstract member-signature get hashCode() core::int*;
abstract member-signature method toString() core::String*;
abstract member-signature method noSuchMethod(core::Invocation* invocation) dynamic;
abstract member-signature get runtimeType() core::Type*;
}
class V extends core::Object {
synthetic constructor •() self::V*
: super core::Object::•()
;
abstract member-signature get _identityHashCode() core::int*;
abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) core::bool*;
abstract member-signature method _simpleInstanceOf(dynamic type) core::bool*;
abstract member-signature method _simpleInstanceOfTrue(dynamic type) core::bool*;
abstract member-signature method _simpleInstanceOfFalse(dynamic type) core::bool*;
abstract member-signature operator ==(dynamic other) core::bool*;
abstract member-signature get hashCode() core::int*;
abstract member-signature method toString() core::String*;
abstract member-signature method noSuchMethod(core::Invocation* invocation) dynamic;
abstract member-signature get runtimeType() core::Type*;
}
static method test() dynamic {
self::T* t;
self::V* v;
{
function T() core::Null? {}
}
{
dynamic v;
}
{
self::T* t;
() →* core::Null? x = let final () →* core::Null? T = () core::Null? {} in T;
}
{
self::V* v;
dynamic V = invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/named_function_scope.dart:33:9: Error: Can't declare 'V' because it was already used in this scope.
var V;
^";
}
{
self::V* v;
dynamic V = let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/named_function_scope.dart:38:9: Error: Can't declare 'V' because it was already used in this scope.
var V = null;
^" in null;
}
{
() →* core::Null? x = let final dynamic #t2 = invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/named_function_scope.dart:43:15: Error: Can't declare 'T' because it was already used in this scope.
var x = T T() {};
^" in let final () →* core::Null? T = () → core::Null? {} in T;
}
{
self::V* V = invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/named_function_scope.dart:49:7: Error: Can't declare 'V' because it was already used in this scope.
V V;
^";
}
{
<T extends core::Object* = dynamic>() →* core::Null? x = let final dynamic #t3 = invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/named_function_scope.dart:54:13: Error: 'T' is already declared in this scope.
var x = T<T>() {};
^" in let final <T extends core::Object* = dynamic>() →* core::Null? T = <T extends core::Object* = dynamic>() → core::Null? {} in T;
}
{
self::T* t;
{
invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/named_function_scope.dart:58:7: Error: Can't declare 'T' because it was already used in this scope.
T T() {}
^";
function T() → self::T* {}
}
}
{
{
invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/named_function_scope.dart:61:7: Error: Can't declare 'T' because it was already used in this scope.
T T() {}
^";
function T() → self::T* {}
}
}
{
self::T* t;
{
invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/named_function_scope.dart:65:7: Error: Can't declare 'T' because it was already used in this scope.
T T(T t) {}
^";
function T(self::T* t) → self::T* {}
}
}
{
{
invalid-expression "pkg/front_end/testcases/general_nnbd_opt_out/named_function_scope.dart:68:7: Error: Can't declare 'T' because it was already used in this scope.
T T(T t) {}
^";
function T(self::T* t) → self::T* {}
}
}
{
function T(invalid-type t) → void {}
}
}
static method main() → void {}