blob: 8a4ff46190451e2a15e1be5f5e9e9614a1b4a8b6 [file] [log] [blame]
library;
//
// Problems in library:
//
// pkg/front_end/testcases/dot_shorthands/abstract_class.dart:6:11: Error: The class 'Function' is abstract and can't be instantiated.
// return .new(); // Error
// ^^^
//
// pkg/front_end/testcases/dot_shorthands/abstract_class.dart:10:11: Error: Constructors on abstract classes can't be torn off.
// return .new; // Error
// ^^^
//
import self as self;
import "dart:core" as core;
import "dart:async" as asy;
static method instantiation() core::Function {
return invalid-expression "pkg/front_end/testcases/dot_shorthands/abstract_class.dart:6:11: Error: The class 'Function' is abstract and can't be instantiated.
return .new(); // Error
^^^" as{TypeError,ForDynamic} core::Function;
}
static method tearOff() core::Function {
return invalid-expression "pkg/front_end/testcases/dot_shorthands/abstract_class.dart:10:11: Error: Constructors on abstract classes can't be torn off.
return .new; // Error
^^^" as{TypeError,ForDynamic} core::Function;
}
static method main() void async /* emittedValueType= void */ {
core::List<core::int> iter = core::_GrowableList::_literal2<core::int>(1, 2);
{
synthesized asy::Stream<core::int> :stream = asy::Stream::fromIterable<core::int>(iter);
synthesized asy::_StreamIterator<core::int>? :for-iterator = new asy::_StreamIterator::•<core::int>(:stream);
try
while (let dynamic #t1 = asy::_asyncStarMoveNextHelper(:stream) in await :for-iterator.{asy::_StreamIterator::moveNext}(){() → asy::Future<core::bool>}) {
core::int x = :for-iterator.{asy::_StreamIterator::current}{core::int};
{
core::print(x);
}
}
finally
if(!(:for-iterator.{asy::_StreamIterator::_subscription}{asy::StreamSubscription<core::int>?} == null))
await :for-iterator.{asy::_StreamIterator::cancel}(){() asy::Future<dynamic>};
}
}