blob: 17936f5e8d3b2745780f052ddfddd54757ca022f [file] [log] [blame]
library;
//
// Problems in library:
//
// pkg/front_end/testcases/general/expressions.dart:74:16: Error: Method not found: 'int.toString'.
// print(int?.toString());
// ^^^^^^^^
//
import self as self;
import "dart:core" as core;
static method foo({dynamic fisk = #C1}) → dynamic {
core::print(fisk);
}
static method caller(dynamic f) dynamic {
f{dynamic}.call();
}
static method main() dynamic {
core::int* i = 0;
core::print(i =={core::num::==}{(core::Object*) →* core::bool*} 1 ?{core::String*} "bad" : "good");
core::print("${i}");
core::print("'${i}'");
core::print(" '${i}' ");
core::print(" '${i}' '${i}'");
core::print(" '${i}' '${i}'");
core::print("foobar");
core::print(" '${i}' '${i}' '${i}' '${i}'");
try {
throw "fisk";
}
on core::String* catch(final core::String* e, final core::StackTrace* s) {
core::print(e);
if(!(s == null))
core::print(s);
}
for (; false; ) {
}
core::List<core::String*>* list = core::_GrowableList::_literal1<core::String*>("Hello, World!");
core::print(list.{core::List::[]}(i){(core::int*) →* core::String*});
list.{core::List::[]=}(i, "Hello, Brave New World!"){(core::int*, core::String*) →* void};
core::print(list.{core::List::[]}(i){(core::int*) →* core::String*});
i = 87;
core::print(i.{core::int::unary-}(){() →* core::int*});
core::print(i.{core::int::~}(){() →* core::int*});
core::print(!(i =={core::num::==}{(core::Object*) →* core::bool*} 42));
core::print(i = i.{core::num::-}(1){(core::num*) →* core::int*});
core::print(i = i.{core::num::+}(1){(core::num*) →* core::int*});
core::print(let final core::int* #t1 = i in let final core::int* #t2 = i = #t1.{core::num::-}(1){(core::num*) →* core::int*} in #t1);
core::print(let final core::int* #t3 = i in let final core::int* #t4 = i = #t3.{core::num::+}(1){(core::num*) →* core::int*} in #t3);
core::print(new core::Object::•());
core::print(#C2);
core::print(core::_List::•<core::String*>(2).{core::Object::runtimeType}{core::Type*});
self::foo(fisk: "Blorp gulp");
function f() Null {
core::print("f was called");
}
self::caller(f);
self::caller(() Null {
core::print("<anon> was called");
});
function g([dynamic message = #C1]) → Null {
core::print(message);
}
g("Hello, World"){([dynamic]) →* Null};
self::caller(([dynamic x = #C1]) → Null {
core::print("<anon> was called with ${x}");
});
function h({dynamic message = #C1}) → Null {
core::print(message);
}
h(message: "Hello, World"){({message: dynamic}) →* Null};
self::caller(({dynamic x = #C1}) → Null {
core::print("<anon> was called with ${x}");
});
core::print((#C3).{core::Type::toString}(){() →* core::String*});
core::print(#C3);
core::print(let final core::Type* #t5 = #C3 in block {
#t5.{core::Type::toString}(){() →* core::String*};
} =>#t5);
try {
core::print(invalid-expression "pkg/front_end/testcases/general/expressions.dart:74:16: Error: Method not found: 'int.toString'.
print(int?.toString());
^^^^^^^^");
throw "Shouldn't work";
}
on core::NoSuchMethodError* catch(final core::NoSuchMethodError* e) {
core::print("As expected: ${e}");
}
core::print(core::int::parse("42"));
}
constants {
#C1 = null
#C2 = core::Object {}
#C3 = TypeLiteralConstant(core::int*)
}
Extra constant evaluation status:
Evaluated: StringConcatenation @ org-dartlang-testcase:///expressions.dart:21:8 -> StringConstant("foobar")
Evaluated: VariableGetImpl @ org-dartlang-testcase:///expressions.dart:72:9 -> TypeLiteralConstant(int*)
Evaluated: VariableGet @ org-dartlang-testcase:///expressions.dart:72:9 -> TypeLiteralConstant(int*)
Extra constant evaluation: evaluated: 133, effectively constant: 3
Constructor coverage from constants:
org-dartlang-testcase:///expressions.dart:
- Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart:25:9)