blob: 155e18a487af0e8178471eb8ece7b52ab8460231 [file] [log] [blame]
library;
import self as self;
import "dart:core" as core;
class T extends core::Object {
synthetic constructor •() void
: super core::Object::•()
;
}
class V extends core::Object {
synthetic constructor •() void
: super core::Object::•()
;
}
static const field dynamic #errors = const <dynamic>["pkg/front_end/testcases/named_function_scope.dart:28:48: Error: A function expression can't have a name.
var x = /*@error=NamedFunctionExpression*/ T() {};
^", "pkg/front_end/testcases/named_function_scope.dart:46:9: Error: A function expression can't have a return type.
T
^", "pkg/front_end/testcases/named_function_scope.dart:49:9: Error: A function expression can't have a name.
T() {};
^", "pkg/front_end/testcases/named_function_scope.dart:63:9: Error: A function expression can't have a name.
T< /*@context=DuplicatedNameCause*/ T>() {};
^", "pkg/front_end/testcases/named_function_scope.dart:84:32: Error: 'T' isn't a type.
void T(/*@error=NotAType*/ T t) {}
^"]/* from null */;
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/named_function_scope.dart:33:49: Error: Can't declare 'V' because it was already used in this scope.
var /*@error=DuplicatedNamePreviouslyUsed*/ V;
^";
}
{
self::V v;
dynamic V = let final dynamic #t1 = let<BottomType> _ = null in invalid-expression "pkg/front_end/testcases/named_function_scope.dart:38:49: Error: Can't declare 'V' because it was already used in this scope.
var /*@error=DuplicatedNamePreviouslyUsed*/ V = null;
^" in let final<BottomType> #t2 = null in null;
}
{
dynamic x = let final dynamic #t3 = let<BottomType> _ = null in invalid-expression "pkg/front_end/testcases/named_function_scope.dart:49:9: Error: Can't declare 'T' because it was already used in this scope.
T() {};
^" in let final () → self::T T = () → self::T {} in T;
}
{
self::V V = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:55:47: Error: Can't declare 'V' because it was already used in this scope.
V /*@error=DuplicatedNamePreviouslyUsed*/ V;
^" as{TypeError} self::V;
}
{
dynamic x = let final dynamic #t4 = let<BottomType> _ = null in invalid-expression "pkg/front_end/testcases/named_function_scope.dart:63:9: Error: 'T' is already declared in this scope.
T< /*@context=DuplicatedNameCause*/ T>() {};
^" in let final <T extends core::Object = dynamic>() → dynamic T = <T extends core::Object = dynamic>() → dynamic {} in T;
}
{
self::T t;
{
let<BottomType> _ = null in invalid-expression "pkg/front_end/testcases/named_function_scope.dart:68:47: Error: Can't declare 'T' because it was already used in this scope.
T /*@error=DuplicatedNamePreviouslyUsed*/ T() {}
^";
function T() → self::T {}
}
}
{
{
let<BottomType> _ = null in invalid-expression "pkg/front_end/testcases/named_function_scope.dart:72:47: Error: Can't declare 'T' because it was already used in this scope.
T /*@error=DuplicatedNamePreviouslyUsed*/ T() {}
^";
function T() → self::T {}
}
}
{
self::T t;
{
let<BottomType> _ = null in invalid-expression "pkg/front_end/testcases/named_function_scope.dart:77:47: Error: Can't declare 'T' because it was already used in this scope.
T /*@error=DuplicatedNamePreviouslyUsed*/ T(T t) {}
^";
function T(self::T t) → self::T {}
}
}
{
{
let<BottomType> _ = null in invalid-expression "pkg/front_end/testcases/named_function_scope.dart:81:47: Error: Can't declare 'T' because it was already used in this scope.
T /*@error=DuplicatedNamePreviouslyUsed*/ T(T t) {}
^";
function T(self::T t) → self::T {}
}
}
{
function T(invalid-type t) → void {}
}
}
static method main() → void {}