Files
sdk/pkg/front_end/testcases/const_functions/const_functions_recursion.dart.strong.expect
T
Johnni Winther 36641368bb [cfe] Treat NonNullableByDefault as default in ast-to-text
This changes ast-to-text to mark legacy libraries instead of
non-nullable-by-default libraries.

TEST=existing

Change-Id: Ib01147e4ef48c2c5b2ffc6b23547998344dfdf2e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/307121
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2023-06-08 06:28:50 +00:00

30 lines
878 B
Plaintext

library;
import self as self;
import "dart:core" as core;
import "package:expect/expect.dart" as exp;
import "package:expect/expect.dart";
static const field core::int b = #C1;
static method fn(core::int a) → core::int {
if(a =={core::num::==}{(core::Object) → core::bool} 1)
return 1;
return a.{core::num::*}(self::fn(a.{core::num::-}(1){(core::num) → core::int})){(core::num) → core::int};
}
static method localTest() → core::int {
function fnLocal(core::int a) → core::int {
if(a =={core::num::==}{(core::Object) → core::bool} 1)
return 1;
return a.{core::num::*}(fnLocal(a.{core::num::-}(1){(core::num) → core::int}){(core::int) → core::int}){(core::num) → core::int};
}
return #C1;
}
static method main() → void {
exp::Expect::equals(#C1, 24);
exp::Expect::equals(self::localTest(), 24);
}
constants {
#C1 = 24
}