blob: df4d4cd521c0e84665ed653ac13fe837ce2fd52b [file] [log] [blame]
library;
//
// Problems in library:
//
// pkg/front_end/testcases/patterns/relational_assignable.dart:10:7: Error: Constant evaluation error:
// > s => 1, // Error: The implicit cast to num is statically known to fail.
// ^
// pkg/front_end/testcases/patterns/relational_assignable.dart:10:7: Context: Expected constant '""' to be of type 'num', but was of type 'String'.
// > s => 1, // Error: The implicit cast to num is statically known to fail.
// ^
// pkg/front_end/testcases/patterns/relational_assignable.dart:10:5: Context: While analyzing:
// > s => 1, // Error: The implicit cast to num is statically known to fail.
// ^
//
import self as self;
import "dart:core" as core;
static method method1(core::int i) dynamic {
return block {
core::int #t1;
final synthesized core::int #0#0 = i;
final const synthesized dynamic #0#3 = invalid-expression "Expected constant '\"\"' to be of type 'num', but was of type 'String'.";
#L1:
{
{
if(#0#0.{core::num::<}(#C1 as core::num){(core::num) → core::bool}) {
#t1 = 0;
break #L1;
}
}
{
if(#0#0.{core::num::>}(invalid-expression "Expected constant '\"\"' to be of type 'num', but was of type 'String'." as core::num){(core::num) → core::bool}) {
#t1 = 1;
break #L1;
}
}
{
if(true) {
#t1 = 2;
break #L1;
}
}
}
} =>#t1;
}
static method method2(core::int i) dynamic {
return block {
core::int #t2;
final synthesized core::int #0#0 = i;
#L2:
{
{
if(#0#0.{core::num::<}(#C1 as core::num){(core::num) → core::bool}) {
#t2 = 0;
break #L2;
}
}
{
if(#0#0.{core::num::>}(#C2 as core::num){(core::num) → core::bool}) {
#t2 = 1;
break #L2;
}
}
{
if(true) {
#t2 = 2;
break #L2;
}
}
}
} =>#t2;
}
constants {
#C1 = 0
#C2 = 3.14
}