mirror of
https://github.com/dart-lang/sdk
synced 2024-10-06 15:50:01 +00:00
[cfe] Support guard clauses in if-case statements
Part of https://github.com/dart-lang/sdk/issues/49749 Change-Id: I2988ba4dda65b4e54282f892fa377cffed70f25c Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/277984 Reviewed-by: Konstantin Shcheglov <scheglov@google.com> Reviewed-by: Johnni Winther <johnniwinther@google.com> Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
This commit is contained in:
parent
166c54b4d9
commit
40a7c7cec0
|
@ -1826,6 +1826,11 @@ class ForwardingListener implements Listener {
|
|||
listener?.handleParenthesizedCondition(token, case_, when);
|
||||
}
|
||||
|
||||
@override
|
||||
void beginPatternGuard(Token when) {
|
||||
listener?.beginPatternGuard(when);
|
||||
}
|
||||
|
||||
@override
|
||||
void beginParenthesizedExpressionOrRecordLiteral(Token token) {
|
||||
listener?.beginParenthesizedExpressionOrRecordLiteral(token);
|
||||
|
@ -1841,6 +1846,11 @@ class ForwardingListener implements Listener {
|
|||
listener?.handleRecordPattern(token, count);
|
||||
}
|
||||
|
||||
@override
|
||||
void endPatternGuard(Token token) {
|
||||
listener?.endPatternGuard(token);
|
||||
}
|
||||
|
||||
@override
|
||||
void endParenthesizedExpression(Token token) {
|
||||
listener?.endParenthesizedExpression(token);
|
||||
|
|
|
@ -1898,6 +1898,11 @@ class Listener implements UnescapeErrorListener {
|
|||
logEvent("ParenthesizedCondition");
|
||||
}
|
||||
|
||||
/// Starts a pattern guard, the expression that follows the 'when' keyword
|
||||
void beginPatternGuard(Token when) {
|
||||
logEvent("PatternGuard");
|
||||
}
|
||||
|
||||
/// Starts a parenthesized expression or a record literal. Will be ended with
|
||||
/// either [endParenthesizedExpression] or [endRecordLiteral].
|
||||
void beginParenthesizedExpressionOrRecordLiteral(Token token) {}
|
||||
|
@ -1913,6 +1918,11 @@ class Listener implements UnescapeErrorListener {
|
|||
logEvent("RecordPattern");
|
||||
}
|
||||
|
||||
/// End a pattern guard, the expression that follows the 'when' keyword
|
||||
void endPatternGuard(Token token) {
|
||||
logEvent("PatternGuard");
|
||||
}
|
||||
|
||||
/// End a parenthesized expression.
|
||||
/// These may be within the condition expression of a control structure
|
||||
/// but will not be the condition of a control structure.
|
||||
|
|
|
@ -6324,7 +6324,9 @@ class Parser {
|
|||
Token? when;
|
||||
if (optional('when', next)) {
|
||||
when = token = next;
|
||||
listener.beginPatternGuard(when);
|
||||
token = parseExpression(token);
|
||||
listener.endPatternGuard(when);
|
||||
}
|
||||
token = ensureCloseParen(token, begin);
|
||||
listener.handleParenthesizedCondition(begin, case_, when);
|
||||
|
|
|
@ -471,6 +471,11 @@ class AstBuilder extends StackListener {
|
|||
push(mixinToken ?? NullValue.Token);
|
||||
}
|
||||
|
||||
@override
|
||||
void beginPatternGuard(Token when) {
|
||||
debugEvent("PatternGuard");
|
||||
}
|
||||
|
||||
@override
|
||||
void beginTopLevelMethod(
|
||||
Token lastConsumed, Token? augmentToken, Token? externalToken) {
|
||||
|
@ -2797,6 +2802,11 @@ class AstBuilder extends StackListener {
|
|||
);
|
||||
}
|
||||
|
||||
@override
|
||||
void endPatternGuard(Token token) {
|
||||
debugEvent("PatternGuard");
|
||||
}
|
||||
|
||||
@override
|
||||
void endRecordLiteral(Token token, int count, Token? constKeyword) {
|
||||
debugEvent("RecordLiteral");
|
||||
|
|
|
@ -2252,6 +2252,7 @@ class BodyBuilder extends StackListenerImpl
|
|||
if (case_ != null) {
|
||||
// ignore: unused_local_variable
|
||||
Expression? guard;
|
||||
Scope? scope;
|
||||
if (when != null) {
|
||||
assert(checkState(token, [
|
||||
unionOfKinds([
|
||||
|
@ -2259,6 +2260,7 @@ class BodyBuilder extends StackListenerImpl
|
|||
ValueKinds.Generator,
|
||||
ValueKinds.ProblemBuilder,
|
||||
]),
|
||||
ValueKinds.Scope,
|
||||
unionOfKinds([
|
||||
ValueKinds.Expression,
|
||||
ValueKinds.Pattern,
|
||||
|
@ -2270,6 +2272,7 @@ class BodyBuilder extends StackListenerImpl
|
|||
]),
|
||||
]));
|
||||
guard = popForValue();
|
||||
scope = pop() as Scope;
|
||||
}
|
||||
assert(checkState(token, [
|
||||
unionOfKinds([
|
||||
|
@ -2286,6 +2289,9 @@ class BodyBuilder extends StackListenerImpl
|
|||
libraryFeatures.patterns, case_.charOffset, case_.charCount);
|
||||
Pattern pattern = toPattern(pop());
|
||||
Expression expression = popForValue();
|
||||
if (scope != null) {
|
||||
push(scope);
|
||||
}
|
||||
push(new Condition(expression, new PatternGuard(pattern, guard)));
|
||||
} else {
|
||||
assert(checkState(token, [
|
||||
|
@ -3430,6 +3436,30 @@ class BodyBuilder extends StackListenerImpl
|
|||
}
|
||||
}
|
||||
|
||||
@override
|
||||
void beginPatternGuard(Token when) {
|
||||
debugEvent("PatternGuard");
|
||||
assert(checkState(when, [
|
||||
unionOfKinds([
|
||||
ValueKinds.Expression,
|
||||
ValueKinds.ProblemBuilder,
|
||||
ValueKinds.Pattern,
|
||||
])
|
||||
]));
|
||||
|
||||
Pattern pattern = toPattern(peek());
|
||||
enterLocalScope("then");
|
||||
for (VariableDeclaration variable in pattern.declaredVariables) {
|
||||
declareVariable(variable, scope);
|
||||
typeInferrer.assignedVariables.declare(variable);
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
void endPatternGuard(Token token) {
|
||||
debugEvent("PatternGuard");
|
||||
}
|
||||
|
||||
@override
|
||||
void beginThenStatement(Token token) {
|
||||
debugEvent("beginThenStatement");
|
||||
|
@ -3437,14 +3467,23 @@ class BodyBuilder extends StackListenerImpl
|
|||
// This is matched by the call to [deferNode] in
|
||||
// [endThenStatement].
|
||||
typeInferrer.assignedVariables.beginNode();
|
||||
Condition condition = peek() as Condition;
|
||||
enterLocalScope("then");
|
||||
Condition condition = pop() as Condition;
|
||||
PatternGuard? patternGuard = condition.patternGuard;
|
||||
if (patternGuard != null) {
|
||||
for (VariableDeclaration variable
|
||||
in patternGuard.pattern.declaredVariables) {
|
||||
declareVariable(variable, scope);
|
||||
typeInferrer.assignedVariables.declare(variable);
|
||||
if (patternGuard != null && patternGuard.guard != null) {
|
||||
assert(checkState(token, [ValueKinds.Scope]));
|
||||
Scope scope = pop() as Scope;
|
||||
push(condition);
|
||||
push(scope);
|
||||
} else {
|
||||
push(condition);
|
||||
// There is no guard, so the scope for "then" isn't entered yet.
|
||||
enterLocalScope("then");
|
||||
if (patternGuard != null) {
|
||||
for (VariableDeclaration variable
|
||||
in patternGuard.pattern.declaredVariables) {
|
||||
declareVariable(variable, scope);
|
||||
typeInferrer.assignedVariables.declare(variable);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2054,6 +2054,11 @@ class _MacroListener implements Listener {
|
|||
_unknown();
|
||||
}
|
||||
|
||||
@override
|
||||
void beginPatternGuard(Token token) {
|
||||
_unhandled();
|
||||
}
|
||||
|
||||
@override
|
||||
void beginParenthesizedExpressionOrRecordLiteral(Token token) {
|
||||
_unhandled();
|
||||
|
@ -2069,6 +2074,11 @@ class _MacroListener implements Listener {
|
|||
_unsupported();
|
||||
}
|
||||
|
||||
@override
|
||||
void endPatternGuard(Token token) {
|
||||
_unhandled();
|
||||
}
|
||||
|
||||
@override
|
||||
void endParenthesizedExpression(Token token) {
|
||||
_unhandled();
|
||||
|
|
|
@ -1802,24 +1802,10 @@ class InferenceVisitorImpl extends InferenceVisitorBase
|
|||
null);
|
||||
}
|
||||
|
||||
List<Statement> replacementStatements;
|
||||
if (node.patternGuard.pattern.declaredVariables.isEmpty) {
|
||||
replacementStatements = [
|
||||
if (otherwise != null) patternMatchedSet,
|
||||
if (then is! Block || then.statements.isNotEmpty) then
|
||||
];
|
||||
} else {
|
||||
replacementStatements = [
|
||||
if (otherwise != null) patternMatchedSet,
|
||||
|
||||
// The block is created to avoid having variables with the same name in
|
||||
// the same scope.
|
||||
engine.forest.createBlock(node.fileOffset, node.fileOffset, [
|
||||
...node.patternGuard.pattern.declaredVariables,
|
||||
if (then is! Block || then.statements.isNotEmpty) then
|
||||
])
|
||||
];
|
||||
}
|
||||
List<Statement> replacementStatements = [
|
||||
if (otherwise != null) patternMatchedSet,
|
||||
if (then is! Block || then.statements.isNotEmpty) then
|
||||
];
|
||||
|
||||
PatternTransformationResult transformationResult = node.patternGuard.pattern
|
||||
.transform(this,
|
||||
|
@ -1828,6 +1814,20 @@ class InferenceVisitorImpl extends InferenceVisitorBase
|
|||
matchedType: scrutineeType,
|
||||
variableInitializingContext: engine.forest
|
||||
.createVariableGet(node.fileOffset, matchedExpressionVariable));
|
||||
transformationResult = transformationResult.combine(
|
||||
new PatternTransformationResult([
|
||||
new PatternTransformationElement(
|
||||
kind: PatternTransformationElementKind.regular,
|
||||
condition: null,
|
||||
variableInitializers:
|
||||
node.patternGuard.pattern.declaredVariables),
|
||||
new PatternTransformationElement(
|
||||
kind: PatternTransformationElementKind.regular,
|
||||
condition: node.patternGuard.guard,
|
||||
variableInitializers: [])
|
||||
]),
|
||||
this);
|
||||
|
||||
replacementStatements = _transformationResultToStatements(
|
||||
node.fileOffset, transformationResult, replacementStatements);
|
||||
|
||||
|
|
|
@ -2588,6 +2588,13 @@ abstract class AbstractParserAstListener implements Listener {
|
|||
seen(data);
|
||||
}
|
||||
|
||||
@override
|
||||
void beginPatternGuard(Token when) {
|
||||
PatternGuardBegin data =
|
||||
new PatternGuardBegin(ParserAstType.BEGIN, when: when);
|
||||
seen(data);
|
||||
}
|
||||
|
||||
@override
|
||||
void beginParenthesizedExpressionOrRecordLiteral(Token token) {
|
||||
ParenthesizedExpressionOrRecordLiteralBegin data =
|
||||
|
@ -2610,6 +2617,12 @@ abstract class AbstractParserAstListener implements Listener {
|
|||
seen(data);
|
||||
}
|
||||
|
||||
@override
|
||||
void endPatternGuard(Token token) {
|
||||
PatternGuardEnd data = new PatternGuardEnd(ParserAstType.END, token: token);
|
||||
seen(data);
|
||||
}
|
||||
|
||||
@override
|
||||
void endParenthesizedExpression(Token token) {
|
||||
ParenthesizedExpressionEnd data =
|
||||
|
@ -7546,6 +7559,18 @@ class ParenthesizedConditionHandle extends ParserAstNode {
|
|||
};
|
||||
}
|
||||
|
||||
class PatternGuardBegin extends ParserAstNode {
|
||||
final Token when;
|
||||
|
||||
PatternGuardBegin(ParserAstType type, {required this.when})
|
||||
: super("PatternGuard", type);
|
||||
|
||||
@override
|
||||
Map<String, Object?> get deprecatedArguments => {
|
||||
"when": when,
|
||||
};
|
||||
}
|
||||
|
||||
class ParenthesizedExpressionOrRecordLiteralBegin extends ParserAstNode {
|
||||
final Token token;
|
||||
|
||||
|
@ -7591,6 +7616,18 @@ class RecordPatternHandle extends ParserAstNode {
|
|||
};
|
||||
}
|
||||
|
||||
class PatternGuardEnd extends ParserAstNode {
|
||||
final Token token;
|
||||
|
||||
PatternGuardEnd(ParserAstType type, {required this.token})
|
||||
: super("PatternGuard", type);
|
||||
|
||||
@override
|
||||
Map<String, Object?> get deprecatedArguments => {
|
||||
"token": token,
|
||||
};
|
||||
}
|
||||
|
||||
class ParenthesizedExpressionEnd extends ParserAstNode {
|
||||
final Token token;
|
||||
|
||||
|
|
|
@ -24,7 +24,9 @@ beginCompilationUnit(void)
|
|||
handleSend(x, case)
|
||||
handleLiteralInt(0)
|
||||
handleConstantPattern(null)
|
||||
handleLiteralBool(true)
|
||||
beginPatternGuard(when)
|
||||
handleLiteralBool(true)
|
||||
endPatternGuard(when)
|
||||
handleParenthesizedCondition((, case, when)
|
||||
beginThenStatement({)
|
||||
beginBlock({, BlockKind(statement))
|
||||
|
|
|
@ -66,6 +66,7 @@ parseUnit(void)
|
|||
parseLiteralInt(case)
|
||||
listener: handleLiteralInt(0)
|
||||
listener: handleConstantPattern(null)
|
||||
listener: beginPatternGuard(when)
|
||||
parseExpression(when)
|
||||
looksLikeOuterPatternEquals(when)
|
||||
skipOuterPattern(when)
|
||||
|
@ -74,6 +75,7 @@ parseUnit(void)
|
|||
parsePrimary(when, expression)
|
||||
parseLiteralBool(when)
|
||||
listener: handleLiteralBool(true)
|
||||
listener: endPatternGuard(when)
|
||||
ensureCloseParen(true, ()
|
||||
listener: handleParenthesizedCondition((, case, when)
|
||||
listener: beginThenStatement({)
|
||||
|
|
|
@ -30,7 +30,9 @@ beginCompilationUnit(void)
|
|||
handleType(int, null)
|
||||
endAsOperatorType(as)
|
||||
handleCastPattern(as)
|
||||
handleLiteralBool(true)
|
||||
beginPatternGuard(when)
|
||||
handleLiteralBool(true)
|
||||
endPatternGuard(when)
|
||||
handleParenthesizedCondition((, case, when)
|
||||
beginThenStatement({)
|
||||
beginBlock({, BlockKind(statement))
|
||||
|
|
|
@ -73,6 +73,7 @@ parseUnit(void)
|
|||
listener: handleType(int, null)
|
||||
listener: endAsOperatorType(as)
|
||||
listener: handleCastPattern(as)
|
||||
listener: beginPatternGuard(when)
|
||||
parseExpression(when)
|
||||
looksLikeOuterPatternEquals(when)
|
||||
skipOuterPattern(when)
|
||||
|
@ -81,6 +82,7 @@ parseUnit(void)
|
|||
parsePrimary(when, expression)
|
||||
parseLiteralBool(when)
|
||||
listener: handleLiteralBool(true)
|
||||
listener: endPatternGuard(when)
|
||||
ensureCloseParen(true, ()
|
||||
listener: handleParenthesizedCondition((, case, when)
|
||||
listener: beginThenStatement({)
|
||||
|
|
|
@ -31,20 +31,22 @@ beginCompilationUnit(f)
|
|||
handleSend(x, case)
|
||||
handleNoType(case)
|
||||
handleVariablePattern(null, _, false)
|
||||
handleIdentifier(y, expression)
|
||||
handleNoTypeArguments(+)
|
||||
handleNoArguments(+)
|
||||
handleSend(y, +)
|
||||
beginBinaryExpression(+)
|
||||
handleNoTypeVariables(()
|
||||
beginFunctionExpression(()
|
||||
beginFormalParameters((, MemberKind.Local)
|
||||
endFormalParameters(0, (, ), MemberKind.Local)
|
||||
handleAsyncModifier(null, null)
|
||||
handleLiteralInt(0)
|
||||
handleExpressionFunctionBody(=>, null)
|
||||
endFunctionExpression((, ))
|
||||
endBinaryExpression(+)
|
||||
beginPatternGuard(when)
|
||||
handleIdentifier(y, expression)
|
||||
handleNoTypeArguments(+)
|
||||
handleNoArguments(+)
|
||||
handleSend(y, +)
|
||||
beginBinaryExpression(+)
|
||||
handleNoTypeVariables(()
|
||||
beginFunctionExpression(()
|
||||
beginFormalParameters((, MemberKind.Local)
|
||||
endFormalParameters(0, (, ), MemberKind.Local)
|
||||
handleAsyncModifier(null, null)
|
||||
handleLiteralInt(0)
|
||||
handleExpressionFunctionBody(=>, null)
|
||||
endFunctionExpression((, ))
|
||||
endBinaryExpression(+)
|
||||
endPatternGuard(when)
|
||||
handleParenthesizedCondition((, case, when)
|
||||
handleThenControlFlow())
|
||||
handleLiteralInt(0)
|
||||
|
|
|
@ -78,6 +78,7 @@ parseUnit(f)
|
|||
parseVariablePattern(case, PatternContext.matching, typeInfo: Instance of 'NoType')
|
||||
listener: handleNoType(case)
|
||||
listener: handleVariablePattern(null, _, false)
|
||||
listener: beginPatternGuard(when)
|
||||
parseExpression(when)
|
||||
looksLikeOuterPatternEquals(when)
|
||||
skipOuterPattern(when)
|
||||
|
@ -124,6 +125,7 @@ parseUnit(f)
|
|||
inGenerator()
|
||||
listener: endFunctionExpression((, ))
|
||||
listener: endBinaryExpression(+)
|
||||
listener: endPatternGuard(when)
|
||||
ensureCloseParen(0, ()
|
||||
listener: handleParenthesizedCondition((, case, when)
|
||||
listener: handleThenControlFlow())
|
||||
|
|
|
@ -31,20 +31,22 @@ beginCompilationUnit(f)
|
|||
handleSend(x, case)
|
||||
handleNoType(case)
|
||||
handleVariablePattern(null, _, false)
|
||||
handleIdentifier(y, expression)
|
||||
handleNoTypeArguments(+)
|
||||
handleNoArguments(+)
|
||||
handleSend(y, +)
|
||||
beginBinaryExpression(+)
|
||||
handleNoTypeVariables(()
|
||||
beginFunctionExpression(()
|
||||
beginFormalParameters((, MemberKind.Local)
|
||||
endFormalParameters(0, (, ), MemberKind.Local)
|
||||
handleAsyncModifier(null, null)
|
||||
handleLiteralInt(0)
|
||||
handleExpressionFunctionBody(=>, null)
|
||||
endFunctionExpression((, ))
|
||||
endBinaryExpression(+)
|
||||
beginPatternGuard(when)
|
||||
handleIdentifier(y, expression)
|
||||
handleNoTypeArguments(+)
|
||||
handleNoArguments(+)
|
||||
handleSend(y, +)
|
||||
beginBinaryExpression(+)
|
||||
handleNoTypeVariables(()
|
||||
beginFunctionExpression(()
|
||||
beginFormalParameters((, MemberKind.Local)
|
||||
endFormalParameters(0, (, ), MemberKind.Local)
|
||||
handleAsyncModifier(null, null)
|
||||
handleLiteralInt(0)
|
||||
handleExpressionFunctionBody(=>, null)
|
||||
endFunctionExpression((, ))
|
||||
endBinaryExpression(+)
|
||||
endPatternGuard(when)
|
||||
handleParenthesizedCondition((, case, when)
|
||||
beginThenStatement({)
|
||||
beginBlock({, BlockKind(statement))
|
||||
|
|
|
@ -74,6 +74,7 @@ parseUnit(f)
|
|||
parseVariablePattern(case, PatternContext.matching, typeInfo: Instance of 'NoType')
|
||||
listener: handleNoType(case)
|
||||
listener: handleVariablePattern(null, _, false)
|
||||
listener: beginPatternGuard(when)
|
||||
parseExpression(when)
|
||||
looksLikeOuterPatternEquals(when)
|
||||
skipOuterPattern(when)
|
||||
|
@ -120,6 +121,7 @@ parseUnit(f)
|
|||
inGenerator()
|
||||
listener: endFunctionExpression((, ))
|
||||
listener: endBinaryExpression(+)
|
||||
listener: endPatternGuard(when)
|
||||
ensureCloseParen(0, ()
|
||||
listener: handleParenthesizedCondition((, case, when)
|
||||
listener: beginThenStatement({)
|
||||
|
|
|
@ -2738,6 +2738,13 @@ class ParserTestListener implements Listener {
|
|||
doPrint('handleParenthesizedCondition(' '$token, ' '$case_, ' '$when)');
|
||||
}
|
||||
|
||||
@override
|
||||
void beginPatternGuard(Token when) {
|
||||
seen(when);
|
||||
doPrint('beginPatternGuard(' '$when)');
|
||||
indent++;
|
||||
}
|
||||
|
||||
@override
|
||||
void beginParenthesizedExpressionOrRecordLiteral(Token token) {
|
||||
seen(token);
|
||||
|
@ -2759,6 +2766,13 @@ class ParserTestListener implements Listener {
|
|||
doPrint('handleRecordPattern(' '$token, ' '$count)');
|
||||
}
|
||||
|
||||
@override
|
||||
void endPatternGuard(Token token) {
|
||||
indent--;
|
||||
seen(token);
|
||||
doPrint('endPatternGuard(' '$token)');
|
||||
}
|
||||
|
||||
@override
|
||||
void endParenthesizedExpression(Token token) {
|
||||
indent--;
|
||||
|
|
|
@ -5,5 +5,7 @@ import "dart:core" as core;
|
|||
static method f(dynamic x) → void {
|
||||
final dynamic #t1 = x;
|
||||
if(#t1 =={core::Object::==}{(core::Object) → core::bool} 0) {
|
||||
if(true) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,5 +5,7 @@ import "dart:core" as core;
|
|||
static method f(dynamic x) → void {
|
||||
final dynamic #t1 = x;
|
||||
if(#t1 =={core::Object::==}{(core::Object) → core::bool} 0) {
|
||||
if(true) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,5 +5,7 @@ import "dart:core" as core;
|
|||
static method f(dynamic x) → void {
|
||||
final dynamic #t1 = x;
|
||||
if(#t1 =={core::Object::==}{(core::Object) → core::bool} 0) {
|
||||
if(true) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,5 +5,7 @@ import "dart:core" as core;
|
|||
static method f(dynamic x) → void {
|
||||
final dynamic #t1 = x;
|
||||
if(#t1 =={core::Object::==}{(core::Object) → core::bool} 0) {
|
||||
if(true) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,5 +5,7 @@ import "dart:core" as core;
|
|||
static method f(dynamic x) → void {
|
||||
final dynamic #t1 = x;
|
||||
if(#t1 =={core::Object::==}{(core::Object) → core::bool} 0) {
|
||||
if(true) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,5 +6,7 @@ static method f(dynamic x) → void {
|
|||
final dynamic #t1 = x;
|
||||
final core::int #t2 = #t1 as{ForNonNullableByDefault} core::int;
|
||||
if(#t2 =={core::num::==}{(core::Object) → core::bool} 0) {
|
||||
if(true) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,5 +6,7 @@ static method f(dynamic x) → void {
|
|||
final dynamic #t1 = x;
|
||||
final core::int #t2 = #t1 as{ForNonNullableByDefault} core::int;
|
||||
if(#t2 =={core::num::==}{(core::Object) → core::bool} 0) {
|
||||
if(true) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,5 +6,7 @@ static method f(dynamic x) → void {
|
|||
final dynamic #t1 = x;
|
||||
final core::int #t2 = #t1 as{ForNonNullableByDefault} core::int;
|
||||
if(#t2 =={core::num::==}{(core::Object) → core::bool} 0) {
|
||||
if(true) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,5 +6,7 @@ static method f(dynamic x) → void {
|
|||
final dynamic #t1 = x;
|
||||
final core::int #t2 = #t1 as{ForNonNullableByDefault} core::int;
|
||||
if(#t2 =={core::num::==}{(core::Object) → core::bool} 0) {
|
||||
if(true) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,5 +6,7 @@ static method f(dynamic x) → void {
|
|||
final dynamic #t1 = x;
|
||||
final core::int #t2 = #t1 as{ForNonNullableByDefault} core::int;
|
||||
if(#t2 =={core::num::==}{(core::Object) → core::bool} 0) {
|
||||
if(true) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,22 +5,18 @@ import "dart:core" as core;
|
|||
static method test(dynamic x) → dynamic {
|
||||
final dynamic #t1 = x;
|
||||
final core::int #t2 = #t1 as{ForNonNullableByDefault} core::int;
|
||||
core::int y = #t2;
|
||||
{
|
||||
core::int y = #t2;
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
final dynamic #t3 = x;
|
||||
final dynamic #t4 = #t3;
|
||||
if(#t4 is core::List<dynamic> && #t4{core::List<dynamic>}.{core::List::length}{core::int}.{core::num::==}(1){(core::Object) → core::bool}) {
|
||||
final dynamic #t5 = #t4{core::List<dynamic>}.{core::List::[]}(0){(core::int) → dynamic};
|
||||
final core::String #t6 = #t5 as{ForNonNullableByDefault} core::String;
|
||||
core::String y = #t6;
|
||||
{
|
||||
core::String y = #t6;
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
final dynamic #t7 = x;
|
||||
|
@ -33,11 +29,9 @@ static method test(dynamic x) → dynamic {
|
|||
if(#t12.{core::List::length}{core::int}.{core::num::==}(1){(core::Object) → core::bool}) {
|
||||
final dynamic #t13 = #t12{core::List<dynamic>}.{core::List::[]}(0){(core::int) → dynamic};
|
||||
if(#t10 =={core::Object::==}{(core::Object) → core::bool} 0) {
|
||||
core::bool y = #t13;
|
||||
{
|
||||
core::bool y = #t13;
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,22 +5,18 @@ import "dart:core" as core;
|
|||
static method test(dynamic x) → dynamic {
|
||||
final dynamic #t1 = x;
|
||||
final core::int #t2 = #t1 as{ForNonNullableByDefault} core::int;
|
||||
core::int y = #t2;
|
||||
{
|
||||
core::int y = #t2;
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
final dynamic #t3 = x;
|
||||
final dynamic #t4 = #t3;
|
||||
if(#t4 is core::List<dynamic> && #t4{core::List<dynamic>}.{core::List::length}{core::int}.{core::num::==}(1){(core::Object) → core::bool}) {
|
||||
final dynamic #t5 = #t4{core::List<dynamic>}.{core::List::[]}(0){(core::int) → dynamic};
|
||||
final core::String #t6 = #t5 as{ForNonNullableByDefault} core::String;
|
||||
core::String y = #t6;
|
||||
{
|
||||
core::String y = #t6;
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
final dynamic #t7 = x;
|
||||
|
@ -33,11 +29,9 @@ static method test(dynamic x) → dynamic {
|
|||
if(#t12.{core::List::length}{core::int}.{core::num::==}(1){(core::Object) → core::bool}) {
|
||||
final dynamic #t13 = #t12{core::List<dynamic>}.{core::List::[]}(0){(core::int) → dynamic};
|
||||
if(#t10 =={core::Object::==}{(core::Object) → core::bool} 0) {
|
||||
core::bool y = #t13;
|
||||
{
|
||||
core::bool y = #t13;
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,22 +5,18 @@ import "dart:core" as core;
|
|||
static method test(dynamic x) → dynamic {
|
||||
final dynamic #t1 = x;
|
||||
final core::int #t2 = #t1 as{ForNonNullableByDefault} core::int;
|
||||
core::int y = #t2;
|
||||
{
|
||||
core::int y = #t2;
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
final dynamic #t3 = x;
|
||||
final dynamic #t4 = #t3;
|
||||
if(#t4 is core::List<dynamic> && #t4{core::List<dynamic>}.{core::List::length}{core::int}.{core::num::==}(1){(core::Object) → core::bool}) {
|
||||
final dynamic #t5 = #t4{core::List<dynamic>}.{core::List::[]}(0){(core::int) → dynamic};
|
||||
final core::String #t6 = #t5 as{ForNonNullableByDefault} core::String;
|
||||
core::String y = #t6;
|
||||
{
|
||||
core::String y = #t6;
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
final dynamic #t7 = x;
|
||||
|
@ -33,11 +29,9 @@ static method test(dynamic x) → dynamic {
|
|||
if(#t12.{core::List::length}{core::int}.{core::num::==}(1){(core::Object) → core::bool}) {
|
||||
final dynamic #t13 = #t12{core::List<dynamic>}.{core::List::[]}(0){(core::int) → dynamic};
|
||||
if(#t10 =={core::Object::==}{(core::Object) → core::bool} 0) {
|
||||
core::bool y = #t13;
|
||||
{
|
||||
core::bool y = #t13;
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,22 +5,18 @@ import "dart:core" as core;
|
|||
static method test(dynamic x) → dynamic {
|
||||
final dynamic #t1 = x;
|
||||
final core::int #t2 = #t1 as{ForNonNullableByDefault} core::int;
|
||||
core::int y = #t2;
|
||||
{
|
||||
core::int y = #t2;
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
final dynamic #t3 = x;
|
||||
final dynamic #t4 = #t3;
|
||||
if(#t4 is core::List<dynamic> && #t4{core::List<dynamic>}.{core::List::length}{core::int}.{core::num::==}(1){(core::Object) → core::bool}) {
|
||||
final dynamic #t5 = #t4{core::List<dynamic>}.{core::List::[]}(0){(core::int) → dynamic};
|
||||
final core::String #t6 = #t5 as{ForNonNullableByDefault} core::String;
|
||||
core::String y = #t6;
|
||||
{
|
||||
core::String y = #t6;
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
final dynamic #t7 = x;
|
||||
|
@ -33,11 +29,9 @@ static method test(dynamic x) → dynamic {
|
|||
if(#t12.{core::List::length}{core::int}.{core::num::==}(1){(core::Object) → core::bool}) {
|
||||
final dynamic #t13 = #t12{core::List<dynamic>}.{core::List::[]}(0){(core::int) → dynamic};
|
||||
if(#t10 =={core::Object::==}{(core::Object) → core::bool} 0) {
|
||||
core::bool y = #t13;
|
||||
{
|
||||
core::bool y = #t13;
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,22 +5,18 @@ import "dart:core" as core;
|
|||
static method test(dynamic x) → dynamic {
|
||||
final dynamic #t1 = x;
|
||||
final core::int #t2 = #t1 as{ForNonNullableByDefault} core::int;
|
||||
core::int y = #t2;
|
||||
{
|
||||
core::int y = #t2;
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
final dynamic #t3 = x;
|
||||
final dynamic #t4 = #t3;
|
||||
if(#t4 is core::List<dynamic> && #t4{core::List<dynamic>}.{core::List::length}{core::int}.{core::num::==}(1){(core::Object) → core::bool}) {
|
||||
final dynamic #t5 = #t4{core::List<dynamic>}.{core::List::[]}(0){(core::int) → dynamic};
|
||||
final core::String #t6 = #t5 as{ForNonNullableByDefault} core::String;
|
||||
core::String y = #t6;
|
||||
{
|
||||
core::String y = #t6;
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
final dynamic #t7 = x;
|
||||
|
@ -33,11 +29,9 @@ static method test(dynamic x) → dynamic {
|
|||
if(#t12.{core::List::length}{core::int}.{core::num::==}(1){(core::Object) → core::bool}) {
|
||||
final dynamic #t13 = #t12{core::List<dynamic>}.{core::List::[]}(0){(core::int) → dynamic};
|
||||
if(#t10 =={core::Object::==}{(core::Object) → core::bool} 0) {
|
||||
core::bool y = #t13;
|
||||
{
|
||||
core::bool y = #t13;
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,12 +22,10 @@ static method test(dynamic x) → dynamic {
|
|||
final core::String #t6 = #t5 as{ForNonNullableByDefault} core::String;
|
||||
final core::String #t7 = #t6;
|
||||
if(#t7 is core::String) {
|
||||
core::String y = #t7{core::String};
|
||||
#t2 = false;
|
||||
{
|
||||
core::String y = #t7{core::String};
|
||||
{
|
||||
return y;
|
||||
}
|
||||
return y;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,12 +22,10 @@ static method test(dynamic x) → dynamic {
|
|||
final core::String #t6 = #t5 as{ForNonNullableByDefault} core::String;
|
||||
final core::String #t7 = #t6;
|
||||
if(#t7 is core::String) {
|
||||
core::String y = #t7{core::String};
|
||||
#t2 = false;
|
||||
{
|
||||
core::String y = #t7{core::String};
|
||||
{
|
||||
return y;
|
||||
}
|
||||
return y;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,12 +22,10 @@ static method test(dynamic x) → dynamic {
|
|||
final core::String #t6 = #t5 as{ForNonNullableByDefault} core::String;
|
||||
final core::String #t7 = #t6;
|
||||
if(#t7 is core::String) {
|
||||
core::String y = #t7{core::String};
|
||||
#t2 = false;
|
||||
{
|
||||
core::String y = #t7{core::String};
|
||||
{
|
||||
return y;
|
||||
}
|
||||
return y;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,12 +22,10 @@ static method test(dynamic x) → dynamic {
|
|||
final core::String #t6 = #t5 as{ForNonNullableByDefault} core::String;
|
||||
final core::String #t7 = #t6;
|
||||
if(#t7 is core::String) {
|
||||
core::String y = #t7{core::String};
|
||||
#t2 = false;
|
||||
{
|
||||
core::String y = #t7{core::String};
|
||||
{
|
||||
return y;
|
||||
}
|
||||
return y;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,12 +22,10 @@ static method test(dynamic x) → dynamic {
|
|||
final core::String #t6 = #t5 as{ForNonNullableByDefault} core::String;
|
||||
final core::String #t7 = #t6;
|
||||
if(#t7 is core::String) {
|
||||
core::String y = #t7{core::String};
|
||||
#t2 = false;
|
||||
{
|
||||
core::String y = #t7{core::String};
|
||||
{
|
||||
return y;
|
||||
}
|
||||
return y;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,7 +3,5 @@ import self as self;
|
|||
|
||||
static method test(dynamic x) → dynamic {
|
||||
final dynamic #t1 = x;
|
||||
{
|
||||
final dynamic y = #t1;
|
||||
}
|
||||
final dynamic y = #t1;
|
||||
}
|
||||
|
|
|
@ -3,7 +3,5 @@ import self as self;
|
|||
|
||||
static method test(dynamic x) → dynamic {
|
||||
final dynamic #t1 = x;
|
||||
{
|
||||
final dynamic y = #t1;
|
||||
}
|
||||
final dynamic y = #t1;
|
||||
}
|
||||
|
|
|
@ -3,7 +3,5 @@ import self as self;
|
|||
|
||||
static method test(dynamic x) → dynamic {
|
||||
final dynamic #t1 = x;
|
||||
{
|
||||
final dynamic y = #t1;
|
||||
}
|
||||
final dynamic y = #t1;
|
||||
}
|
||||
|
|
|
@ -3,7 +3,5 @@ import self as self;
|
|||
|
||||
static method test(dynamic x) → dynamic {
|
||||
final dynamic #t1 = x;
|
||||
{
|
||||
final dynamic y = #t1;
|
||||
}
|
||||
final dynamic y = #t1;
|
||||
}
|
||||
|
|
|
@ -3,7 +3,5 @@ import self as self;
|
|||
|
||||
static method test(dynamic x) → dynamic {
|
||||
final dynamic #t1 = x;
|
||||
{
|
||||
final dynamic y = #t1;
|
||||
}
|
||||
final dynamic y = #t1;
|
||||
}
|
||||
|
|
|
@ -25,12 +25,10 @@ static method test1(dynamic x) → dynamic {
|
|||
if(!(#t11 == null)) {
|
||||
final core::String #t12 = #t11{core::String};
|
||||
if(#t12 is core::String && #t10 =={core::String::==}{(core::Object) → core::bool} "bar") {
|
||||
core::String? a = #t8;
|
||||
core::String b = #t12{core::String};
|
||||
{
|
||||
core::String? a = #t8;
|
||||
core::String b = #t12{core::String};
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -46,12 +44,10 @@ static method test1(dynamic x) → dynamic {
|
|||
final core::String? #t19 = #t17{core::List<core::String?>}.{core::List::[]}(1){(core::int) → core::String?};
|
||||
final core::String? #t20 = #t18;
|
||||
if(!(#t20 == null) && #t16 =={core::Object::==}{(core::Object) → core::bool} 0) {
|
||||
core::String a = #t20{core::String};
|
||||
core::String? b = #t19;
|
||||
{
|
||||
core::String a = #t20{core::String};
|
||||
core::String? b = #t19;
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -68,11 +64,9 @@ static method test1(dynamic x) → dynamic {
|
|||
final dynamic #t27 = #t26{core::List<dynamic>}.{core::List::[]}(0){(core::int) → dynamic};
|
||||
final dynamic #t28 = #t27;
|
||||
if(!(#t28 == null)) {
|
||||
dynamic a = #t28;
|
||||
{
|
||||
dynamic a = #t28;
|
||||
{
|
||||
return 3;
|
||||
}
|
||||
return 3;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -117,12 +111,10 @@ static method test2(core::List<core::Object?> x) → dynamic {
|
|||
if(!(#t45 == null)) {
|
||||
final core::String #t46 = #t45{core::String};
|
||||
if(#t46 is core::String && #t44 =={core::String::==}{(core::Object) → core::bool} "bar") {
|
||||
core::String? a = #t42;
|
||||
core::String b = #t46{core::String};
|
||||
{
|
||||
core::String? a = #t42;
|
||||
core::String b = #t46{core::String};
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -138,12 +130,10 @@ static method test2(core::List<core::Object?> x) → dynamic {
|
|||
final core::String? #t53 = #t51{core::List<core::String?>}.{core::List::[]}(1){(core::int) → core::String?};
|
||||
final core::String? #t54 = #t52;
|
||||
if(!(#t54 == null) && #t50 =={core::Object::==}{(core::Object) → core::bool} 0) {
|
||||
core::String a = #t54{core::String};
|
||||
core::String? b = #t53;
|
||||
{
|
||||
core::String a = #t54{core::String};
|
||||
core::String? b = #t53;
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -160,11 +150,9 @@ static method test2(core::List<core::Object?> x) → dynamic {
|
|||
final dynamic #t61 = #t60{core::List<dynamic>}.{core::List::[]}(0){(core::int) → dynamic};
|
||||
final dynamic #t62 = #t61;
|
||||
if(!(#t62 == null)) {
|
||||
core::Object a = #t62;
|
||||
{
|
||||
core::Object a = #t62;
|
||||
{
|
||||
return 3;
|
||||
}
|
||||
return 3;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,12 +25,10 @@ static method test1(dynamic x) → dynamic {
|
|||
if(!(#t11 == null)) {
|
||||
final core::String #t12 = #t11{core::String};
|
||||
if(#t12 is core::String && #t10 =={core::String::==}{(core::Object) → core::bool} "bar") {
|
||||
core::String? a = #t8;
|
||||
core::String b = #t12{core::String};
|
||||
{
|
||||
core::String? a = #t8;
|
||||
core::String b = #t12{core::String};
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -46,12 +44,10 @@ static method test1(dynamic x) → dynamic {
|
|||
final core::String? #t19 = #t17{core::List<core::String?>}.{core::List::[]}(1){(core::int) → core::String?};
|
||||
final core::String? #t20 = #t18;
|
||||
if(!(#t20 == null) && #t16 =={core::Object::==}{(core::Object) → core::bool} 0) {
|
||||
core::String a = #t20{core::String};
|
||||
core::String? b = #t19;
|
||||
{
|
||||
core::String a = #t20{core::String};
|
||||
core::String? b = #t19;
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -68,11 +64,9 @@ static method test1(dynamic x) → dynamic {
|
|||
final dynamic #t27 = #t26{core::List<dynamic>}.{core::List::[]}(0){(core::int) → dynamic};
|
||||
final dynamic #t28 = #t27;
|
||||
if(!(#t28 == null)) {
|
||||
dynamic a = #t28;
|
||||
{
|
||||
dynamic a = #t28;
|
||||
{
|
||||
return 3;
|
||||
}
|
||||
return 3;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -117,12 +111,10 @@ static method test2(core::List<core::Object?> x) → dynamic {
|
|||
if(!(#t45 == null)) {
|
||||
final core::String #t46 = #t45{core::String};
|
||||
if(#t46 is core::String && #t44 =={core::String::==}{(core::Object) → core::bool} "bar") {
|
||||
core::String? a = #t42;
|
||||
core::String b = #t46{core::String};
|
||||
{
|
||||
core::String? a = #t42;
|
||||
core::String b = #t46{core::String};
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -138,12 +130,10 @@ static method test2(core::List<core::Object?> x) → dynamic {
|
|||
final core::String? #t53 = #t51{core::List<core::String?>}.{core::List::[]}(1){(core::int) → core::String?};
|
||||
final core::String? #t54 = #t52;
|
||||
if(!(#t54 == null) && #t50 =={core::Object::==}{(core::Object) → core::bool} 0) {
|
||||
core::String a = #t54{core::String};
|
||||
core::String? b = #t53;
|
||||
{
|
||||
core::String a = #t54{core::String};
|
||||
core::String? b = #t53;
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -160,11 +150,9 @@ static method test2(core::List<core::Object?> x) → dynamic {
|
|||
final dynamic #t61 = #t60{core::List<dynamic>}.{core::List::[]}(0){(core::int) → dynamic};
|
||||
final dynamic #t62 = #t61;
|
||||
if(!(#t62 == null)) {
|
||||
core::Object a = #t62;
|
||||
{
|
||||
core::Object a = #t62;
|
||||
{
|
||||
return 3;
|
||||
}
|
||||
return 3;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,12 +25,10 @@ static method test1(dynamic x) → dynamic {
|
|||
if(!(#t11 == null)) {
|
||||
final core::String #t12 = #t11{core::String};
|
||||
if(#t12 is core::String && #t10 =={core::String::==}{(core::Object) → core::bool} "bar") {
|
||||
core::String? a = #t8;
|
||||
core::String b = #t12{core::String};
|
||||
{
|
||||
core::String? a = #t8;
|
||||
core::String b = #t12{core::String};
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -46,12 +44,10 @@ static method test1(dynamic x) → dynamic {
|
|||
final core::String? #t19 = #t17{core::List<core::String?>}.{core::List::[]}(1){(core::int) → core::String?};
|
||||
final core::String? #t20 = #t18;
|
||||
if(!(#t20 == null) && #t16 =={core::Object::==}{(core::Object) → core::bool} 0) {
|
||||
core::String a = #t20{core::String};
|
||||
core::String? b = #t19;
|
||||
{
|
||||
core::String a = #t20{core::String};
|
||||
core::String? b = #t19;
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -68,11 +64,9 @@ static method test1(dynamic x) → dynamic {
|
|||
final dynamic #t27 = #t26{core::List<dynamic>}.{core::List::[]}(0){(core::int) → dynamic};
|
||||
final dynamic #t28 = #t27;
|
||||
if(!(#t28 == null)) {
|
||||
dynamic a = #t28;
|
||||
{
|
||||
dynamic a = #t28;
|
||||
{
|
||||
return 3;
|
||||
}
|
||||
return 3;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -117,12 +111,10 @@ static method test2(core::List<core::Object?> x) → dynamic {
|
|||
if(!(#t45 == null)) {
|
||||
final core::String #t46 = #t45{core::String};
|
||||
if(#t46 is core::String && #t44 =={core::String::==}{(core::Object) → core::bool} "bar") {
|
||||
core::String? a = #t42;
|
||||
core::String b = #t46{core::String};
|
||||
{
|
||||
core::String? a = #t42;
|
||||
core::String b = #t46{core::String};
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -138,12 +130,10 @@ static method test2(core::List<core::Object?> x) → dynamic {
|
|||
final core::String? #t53 = #t51{core::List<core::String?>}.{core::List::[]}(1){(core::int) → core::String?};
|
||||
final core::String? #t54 = #t52;
|
||||
if(!(#t54 == null) && #t50 =={core::Object::==}{(core::Object) → core::bool} 0) {
|
||||
core::String a = #t54{core::String};
|
||||
core::String? b = #t53;
|
||||
{
|
||||
core::String a = #t54{core::String};
|
||||
core::String? b = #t53;
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -160,11 +150,9 @@ static method test2(core::List<core::Object?> x) → dynamic {
|
|||
final dynamic #t61 = #t60{core::List<dynamic>}.{core::List::[]}(0){(core::int) → dynamic};
|
||||
final dynamic #t62 = #t61;
|
||||
if(!(#t62 == null)) {
|
||||
core::Object a = #t62;
|
||||
{
|
||||
core::Object a = #t62;
|
||||
{
|
||||
return 3;
|
||||
}
|
||||
return 3;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,12 +25,10 @@ static method test1(dynamic x) → dynamic {
|
|||
if(!(#t11 == null)) {
|
||||
final core::String #t12 = #t11{core::String};
|
||||
if(#t12 is core::String && #t10 =={core::String::==}{(core::Object) → core::bool} "bar") {
|
||||
core::String? a = #t8;
|
||||
core::String b = #t12{core::String};
|
||||
{
|
||||
core::String? a = #t8;
|
||||
core::String b = #t12{core::String};
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -46,12 +44,10 @@ static method test1(dynamic x) → dynamic {
|
|||
final core::String? #t19 = #t17{core::List<core::String?>}.{core::List::[]}(1){(core::int) → core::String?};
|
||||
final core::String? #t20 = #t18;
|
||||
if(!(#t20 == null) && #t16 =={core::Object::==}{(core::Object) → core::bool} 0) {
|
||||
core::String a = #t20{core::String};
|
||||
core::String? b = #t19;
|
||||
{
|
||||
core::String a = #t20{core::String};
|
||||
core::String? b = #t19;
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -68,11 +64,9 @@ static method test1(dynamic x) → dynamic {
|
|||
final dynamic #t27 = #t26{core::List<dynamic>}.{core::List::[]}(0){(core::int) → dynamic};
|
||||
final dynamic #t28 = #t27;
|
||||
if(!(#t28 == null)) {
|
||||
dynamic a = #t28;
|
||||
{
|
||||
dynamic a = #t28;
|
||||
{
|
||||
return 3;
|
||||
}
|
||||
return 3;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -117,12 +111,10 @@ static method test2(core::List<core::Object?> x) → dynamic {
|
|||
if(!(#t45 == null)) {
|
||||
final core::String #t46 = #t45{core::String};
|
||||
if(#t46 is core::String && #t44 =={core::String::==}{(core::Object) → core::bool} "bar") {
|
||||
core::String? a = #t42;
|
||||
core::String b = #t46{core::String};
|
||||
{
|
||||
core::String? a = #t42;
|
||||
core::String b = #t46{core::String};
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -138,12 +130,10 @@ static method test2(core::List<core::Object?> x) → dynamic {
|
|||
final core::String? #t53 = #t51{core::List<core::String?>}.{core::List::[]}(1){(core::int) → core::String?};
|
||||
final core::String? #t54 = #t52;
|
||||
if(!(#t54 == null) && #t50 =={core::Object::==}{(core::Object) → core::bool} 0) {
|
||||
core::String a = #t54{core::String};
|
||||
core::String? b = #t53;
|
||||
{
|
||||
core::String a = #t54{core::String};
|
||||
core::String? b = #t53;
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -160,11 +150,9 @@ static method test2(core::List<core::Object?> x) → dynamic {
|
|||
final dynamic #t61 = #t60{core::List<dynamic>}.{core::List::[]}(0){(core::int) → dynamic};
|
||||
final dynamic #t62 = #t61;
|
||||
if(!(#t62 == null)) {
|
||||
core::Object a = #t62;
|
||||
{
|
||||
core::Object a = #t62;
|
||||
{
|
||||
return 3;
|
||||
}
|
||||
return 3;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,12 +25,10 @@ static method test1(dynamic x) → dynamic {
|
|||
if(!(#t11 == null)) {
|
||||
final core::String #t12 = #t11{core::String};
|
||||
if(#t12 is core::String && #t10 =={core::String::==}{(core::Object) → core::bool} "bar") {
|
||||
core::String? a = #t8;
|
||||
core::String b = #t12{core::String};
|
||||
{
|
||||
core::String? a = #t8;
|
||||
core::String b = #t12{core::String};
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -46,12 +44,10 @@ static method test1(dynamic x) → dynamic {
|
|||
final core::String? #t19 = #t17{core::List<core::String?>}.{core::List::[]}(1){(core::int) → core::String?};
|
||||
final core::String? #t20 = #t18;
|
||||
if(!(#t20 == null) && #t16 =={core::Object::==}{(core::Object) → core::bool} 0) {
|
||||
core::String a = #t20{core::String};
|
||||
core::String? b = #t19;
|
||||
{
|
||||
core::String a = #t20{core::String};
|
||||
core::String? b = #t19;
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -68,11 +64,9 @@ static method test1(dynamic x) → dynamic {
|
|||
final dynamic #t27 = #t26{core::List<dynamic>}.{core::List::[]}(0){(core::int) → dynamic};
|
||||
final dynamic #t28 = #t27;
|
||||
if(!(#t28 == null)) {
|
||||
dynamic a = #t28;
|
||||
{
|
||||
dynamic a = #t28;
|
||||
{
|
||||
return 3;
|
||||
}
|
||||
return 3;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -117,12 +111,10 @@ static method test2(core::List<core::Object?> x) → dynamic {
|
|||
if(!(#t45 == null)) {
|
||||
final core::String #t46 = #t45{core::String};
|
||||
if(#t46 is core::String && #t44 =={core::String::==}{(core::Object) → core::bool} "bar") {
|
||||
core::String? a = #t42;
|
||||
core::String b = #t46{core::String};
|
||||
{
|
||||
core::String? a = #t42;
|
||||
core::String b = #t46{core::String};
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -138,12 +130,10 @@ static method test2(core::List<core::Object?> x) → dynamic {
|
|||
final core::String? #t53 = #t51{core::List<core::String?>}.{core::List::[]}(1){(core::int) → core::String?};
|
||||
final core::String? #t54 = #t52;
|
||||
if(!(#t54 == null) && #t50 =={core::Object::==}{(core::Object) → core::bool} 0) {
|
||||
core::String a = #t54{core::String};
|
||||
core::String? b = #t53;
|
||||
{
|
||||
core::String a = #t54{core::String};
|
||||
core::String? b = #t53;
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -160,11 +150,9 @@ static method test2(core::List<core::Object?> x) → dynamic {
|
|||
final dynamic #t61 = #t60{core::List<dynamic>}.{core::List::[]}(0){(core::int) → dynamic};
|
||||
final dynamic #t62 = #t61;
|
||||
if(!(#t62 == null)) {
|
||||
core::Object a = #t62;
|
||||
{
|
||||
core::Object a = #t62;
|
||||
{
|
||||
return 3;
|
||||
}
|
||||
return 3;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -45,12 +45,10 @@ static method test2(dynamic x) → dynamic {
|
|||
}
|
||||
}
|
||||
if(#t8 || #t9) {
|
||||
dynamic y = #t8 ?{core::Object} #t10{core::int} : #t11{core::String};
|
||||
#t6 = false;
|
||||
{
|
||||
dynamic y = #t8 ?{core::Object} #t10{core::int} : #t11{core::String};
|
||||
{
|
||||
return y;
|
||||
}
|
||||
return y;
|
||||
}
|
||||
}
|
||||
if(#t6) {
|
||||
|
|
|
@ -45,12 +45,10 @@ static method test2(dynamic x) → dynamic {
|
|||
}
|
||||
}
|
||||
if(#t8 || #t9) {
|
||||
dynamic y = #t8 ?{core::Object} #t10{core::int} : #t11{core::String};
|
||||
#t6 = false;
|
||||
{
|
||||
dynamic y = #t8 ?{core::Object} #t10{core::int} : #t11{core::String};
|
||||
{
|
||||
return y;
|
||||
}
|
||||
return y;
|
||||
}
|
||||
}
|
||||
if(#t6) {
|
||||
|
|
|
@ -45,12 +45,10 @@ static method test2(dynamic x) → dynamic {
|
|||
}
|
||||
}
|
||||
if(#t8 || #t9) {
|
||||
dynamic y = #t8 ?{core::Object} #t10{core::int} : #t11{core::String};
|
||||
#t6 = false;
|
||||
{
|
||||
dynamic y = #t8 ?{core::Object} #t10{core::int} : #t11{core::String};
|
||||
{
|
||||
return y;
|
||||
}
|
||||
return y;
|
||||
}
|
||||
}
|
||||
if(#t6) {
|
||||
|
|
|
@ -45,12 +45,10 @@ static method test2(dynamic x) → dynamic {
|
|||
}
|
||||
}
|
||||
if(#t8 || #t9) {
|
||||
dynamic y = #t8 ?{core::Object} #t10{core::int} : #t11{core::String};
|
||||
#t6 = false;
|
||||
{
|
||||
dynamic y = #t8 ?{core::Object} #t10{core::int} : #t11{core::String};
|
||||
{
|
||||
return y;
|
||||
}
|
||||
return y;
|
||||
}
|
||||
}
|
||||
if(#t6) {
|
||||
|
|
|
@ -45,12 +45,10 @@ static method test2(dynamic x) → dynamic {
|
|||
}
|
||||
}
|
||||
if(#t8 || #t9) {
|
||||
dynamic y = #t8 ?{core::Object} #t10{core::int} : #t11{core::String};
|
||||
#t6 = false;
|
||||
{
|
||||
dynamic y = #t8 ?{core::Object} #t10{core::int} : #t11{core::String};
|
||||
{
|
||||
return y;
|
||||
}
|
||||
return y;
|
||||
}
|
||||
}
|
||||
if(#t6) {
|
||||
|
|
|
@ -66,13 +66,11 @@ static method test5(dynamic x) → dynamic {
|
|||
final dynamic #t24 = #t23!;
|
||||
final dynamic #t25 = #t24;
|
||||
if(#t25 is core::String) {
|
||||
dynamic y1 = #t22;
|
||||
core::String y2 = #t25{core::String};
|
||||
#t20 = false;
|
||||
{
|
||||
dynamic y1 = #t22;
|
||||
core::String y2 = #t25{core::String};
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -66,13 +66,11 @@ static method test5(dynamic x) → dynamic {
|
|||
final dynamic #t24 = #t23!;
|
||||
final dynamic #t25 = #t24;
|
||||
if(#t25 is core::String) {
|
||||
dynamic y1 = #t22;
|
||||
core::String y2 = #t25{core::String};
|
||||
#t20 = false;
|
||||
{
|
||||
dynamic y1 = #t22;
|
||||
core::String y2 = #t25{core::String};
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -66,13 +66,11 @@ static method test5(dynamic x) → dynamic {
|
|||
final dynamic #t24 = #t23!;
|
||||
final dynamic #t25 = #t24;
|
||||
if(#t25 is core::String) {
|
||||
dynamic y1 = #t22;
|
||||
core::String y2 = #t25{core::String};
|
||||
#t20 = false;
|
||||
{
|
||||
dynamic y1 = #t22;
|
||||
core::String y2 = #t25{core::String};
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -66,13 +66,11 @@ static method test5(dynamic x) → dynamic {
|
|||
final dynamic #t24 = #t23!;
|
||||
final dynamic #t25 = #t24;
|
||||
if(#t25 is core::String) {
|
||||
dynamic y1 = #t22;
|
||||
core::String y2 = #t25{core::String};
|
||||
#t20 = false;
|
||||
{
|
||||
dynamic y1 = #t22;
|
||||
core::String y2 = #t25{core::String};
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -66,13 +66,11 @@ static method test5(dynamic x) → dynamic {
|
|||
final dynamic #t24 = #t23!;
|
||||
final dynamic #t25 = #t24;
|
||||
if(#t25 is core::String) {
|
||||
dynamic y1 = #t22;
|
||||
core::String y2 = #t25{core::String};
|
||||
#t20 = false;
|
||||
{
|
||||
dynamic y1 = #t22;
|
||||
core::String y2 = #t25{core::String};
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -156,13 +156,11 @@ static method main() → dynamic {
|
|||
if(#t5 is core::int) {
|
||||
final dynamic #t6 = #t4;
|
||||
if(#t6 is core::int) {
|
||||
core::int x = #t5{core::int};
|
||||
core::int y = #t6{core::int};
|
||||
{
|
||||
core::int x = #t5{core::int};
|
||||
core::int y = #t6{core::int};
|
||||
{
|
||||
self::expectEquals(x, 0);
|
||||
self::expectEquals(y, 0);
|
||||
}
|
||||
self::expectEquals(x, 0);
|
||||
self::expectEquals(y, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -542,13 +542,11 @@ static method main() → dynamic {
|
|||
if(#t14 is core::int) {
|
||||
final dynamic #t15 = #t13;
|
||||
if(#t15 is core::int) {
|
||||
core::int x = #t14{core::int};
|
||||
core::int y = #t15{core::int};
|
||||
{
|
||||
core::int x = #t14{core::int};
|
||||
core::int y = #t15{core::int};
|
||||
{
|
||||
self::expectEquals(x, 0);
|
||||
self::expectEquals(y, 0);
|
||||
}
|
||||
self::expectEquals(x, 0);
|
||||
self::expectEquals(y, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -156,13 +156,11 @@ static method main() → dynamic {
|
|||
if(#t5 is core::int) {
|
||||
final dynamic #t6 = #t4;
|
||||
if(#t6 is core::int) {
|
||||
core::int x = #t5{core::int};
|
||||
core::int y = #t6{core::int};
|
||||
{
|
||||
core::int x = #t5{core::int};
|
||||
core::int y = #t6{core::int};
|
||||
{
|
||||
self::expectEquals(x, 0);
|
||||
self::expectEquals(y, 0);
|
||||
}
|
||||
self::expectEquals(x, 0);
|
||||
self::expectEquals(y, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -156,13 +156,11 @@ static method main() → dynamic {
|
|||
if(#t5 is core::int) {
|
||||
final dynamic #t6 = #t4;
|
||||
if(#t6 is core::int) {
|
||||
core::int x = #t5{core::int};
|
||||
core::int y = #t6{core::int};
|
||||
{
|
||||
core::int x = #t5{core::int};
|
||||
core::int y = #t6{core::int};
|
||||
{
|
||||
self::expectEquals(x, 0);
|
||||
self::expectEquals(y, 0);
|
||||
}
|
||||
self::expectEquals(x, 0);
|
||||
self::expectEquals(y, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -542,13 +542,11 @@ static method main() → dynamic {
|
|||
if(#t13 is core::int) {
|
||||
final dynamic #t14 = #t12;
|
||||
if(#t14 is core::int) {
|
||||
core::int x = #t13{core::int};
|
||||
core::int y = #t14{core::int};
|
||||
{
|
||||
core::int x = #t13{core::int};
|
||||
core::int y = #t14{core::int};
|
||||
{
|
||||
self::expectEquals(x, 0);
|
||||
self::expectEquals(y, 0);
|
||||
}
|
||||
self::expectEquals(x, 0);
|
||||
self::expectEquals(y, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,7 +4,5 @@ import self as self;
|
|||
static method test(dynamic x) → dynamic {
|
||||
final dynamic #t1 = x;
|
||||
final dynamic #t2 = #t1!;
|
||||
{
|
||||
dynamic y = #t2;
|
||||
}
|
||||
dynamic y = #t2;
|
||||
}
|
||||
|
|
|
@ -4,7 +4,5 @@ import self as self;
|
|||
static method test(dynamic x) → dynamic {
|
||||
final dynamic #t1 = x;
|
||||
final dynamic #t2 = #t1!;
|
||||
{
|
||||
dynamic y = #t2;
|
||||
}
|
||||
dynamic y = #t2;
|
||||
}
|
||||
|
|
|
@ -4,7 +4,5 @@ import self as self;
|
|||
static method test(dynamic x) → dynamic {
|
||||
final dynamic #t1 = x;
|
||||
final dynamic #t2 = #t1!;
|
||||
{
|
||||
dynamic y = #t2;
|
||||
}
|
||||
dynamic y = #t2;
|
||||
}
|
||||
|
|
|
@ -4,7 +4,5 @@ import self as self;
|
|||
static method test(dynamic x) → dynamic {
|
||||
final dynamic #t1 = x;
|
||||
final dynamic #t2 = #t1!;
|
||||
{
|
||||
dynamic y = #t2;
|
||||
}
|
||||
dynamic y = #t2;
|
||||
}
|
||||
|
|
|
@ -4,7 +4,5 @@ import self as self;
|
|||
static method test(dynamic x) → dynamic {
|
||||
final dynamic #t1 = x;
|
||||
final dynamic #t2 = #t1!;
|
||||
{
|
||||
dynamic y = #t2;
|
||||
}
|
||||
dynamic y = #t2;
|
||||
}
|
||||
|
|
|
@ -6,18 +6,14 @@ static method test1(dynamic x) → dynamic {
|
|||
final dynamic #t1 = x;
|
||||
final dynamic #t2 = #t1;
|
||||
if(!(#t2 == null)) {
|
||||
{
|
||||
dynamic y = #t2;
|
||||
}
|
||||
dynamic y = #t2;
|
||||
}
|
||||
final dynamic #t3 = x;
|
||||
final dynamic #t4 = #t3;
|
||||
if(!(#t4 == null)) {
|
||||
final dynamic #t5 = #t4;
|
||||
if(#t5 is core::int) {
|
||||
{
|
||||
core::int y = #t5{core::int};
|
||||
}
|
||||
core::int y = #t5{core::int};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -25,18 +21,14 @@ static method test2(core::num x) → dynamic {
|
|||
final core::num #t6 = x;
|
||||
final core::num #t7 = #t6;
|
||||
if(!(#t7 == null)) {
|
||||
{
|
||||
core::num y = #t7;
|
||||
}
|
||||
core::num y = #t7;
|
||||
}
|
||||
final core::num #t8 = x;
|
||||
final core::num #t9 = #t8;
|
||||
if(!(#t9 == null)) {
|
||||
final core::num #t10 = #t9;
|
||||
if(#t10 is core::int) {
|
||||
{
|
||||
core::int y = #t10{core::int};
|
||||
}
|
||||
core::int y = #t10{core::int};
|
||||
}
|
||||
}
|
||||
final core::num #t11 = x;
|
||||
|
@ -44,9 +36,7 @@ static method test2(core::num x) → dynamic {
|
|||
if(!(#t12 == null)) {
|
||||
final core::num #t13 = #t12;
|
||||
if(#t13 is core::String) {
|
||||
{
|
||||
core::String y = #t13{core::String};
|
||||
}
|
||||
core::String y = #t13{core::String};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,18 +6,14 @@ static method test1(dynamic x) → dynamic {
|
|||
final dynamic #t1 = x;
|
||||
final dynamic #t2 = #t1;
|
||||
if(!(#t2 == null)) {
|
||||
{
|
||||
dynamic y = #t2;
|
||||
}
|
||||
dynamic y = #t2;
|
||||
}
|
||||
final dynamic #t3 = x;
|
||||
final dynamic #t4 = #t3;
|
||||
if(!(#t4 == null)) {
|
||||
final dynamic #t5 = #t4;
|
||||
if(#t5 is core::int) {
|
||||
{
|
||||
core::int y = #t5{core::int};
|
||||
}
|
||||
core::int y = #t5{core::int};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -25,18 +21,14 @@ static method test2(core::num x) → dynamic {
|
|||
final core::num #t6 = x;
|
||||
final core::num #t7 = #t6;
|
||||
if(!(#t7 == null)) {
|
||||
{
|
||||
core::num y = #t7;
|
||||
}
|
||||
core::num y = #t7;
|
||||
}
|
||||
final core::num #t8 = x;
|
||||
final core::num #t9 = #t8;
|
||||
if(!(#t9 == null)) {
|
||||
final core::num #t10 = #t9;
|
||||
if(#t10 is core::int) {
|
||||
{
|
||||
core::int y = #t10{core::int};
|
||||
}
|
||||
core::int y = #t10{core::int};
|
||||
}
|
||||
}
|
||||
final core::num #t11 = x;
|
||||
|
@ -44,9 +36,7 @@ static method test2(core::num x) → dynamic {
|
|||
if(!(#t12 == null)) {
|
||||
final core::num #t13 = #t12;
|
||||
if(#t13 is core::String) {
|
||||
{
|
||||
core::String y = #t13{core::String};
|
||||
}
|
||||
core::String y = #t13{core::String};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,18 +6,14 @@ static method test1(dynamic x) → dynamic {
|
|||
final dynamic #t1 = x;
|
||||
final dynamic #t2 = #t1;
|
||||
if(!(#t2 == null)) {
|
||||
{
|
||||
dynamic y = #t2;
|
||||
}
|
||||
dynamic y = #t2;
|
||||
}
|
||||
final dynamic #t3 = x;
|
||||
final dynamic #t4 = #t3;
|
||||
if(!(#t4 == null)) {
|
||||
final dynamic #t5 = #t4;
|
||||
if(#t5 is core::int) {
|
||||
{
|
||||
core::int y = #t5{core::int};
|
||||
}
|
||||
core::int y = #t5{core::int};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -25,18 +21,14 @@ static method test2(core::num x) → dynamic {
|
|||
final core::num #t6 = x;
|
||||
final core::num #t7 = #t6;
|
||||
if(!(#t7 == null)) {
|
||||
{
|
||||
core::num y = #t7;
|
||||
}
|
||||
core::num y = #t7;
|
||||
}
|
||||
final core::num #t8 = x;
|
||||
final core::num #t9 = #t8;
|
||||
if(!(#t9 == null)) {
|
||||
final core::num #t10 = #t9;
|
||||
if(#t10 is core::int) {
|
||||
{
|
||||
core::int y = #t10{core::int};
|
||||
}
|
||||
core::int y = #t10{core::int};
|
||||
}
|
||||
}
|
||||
final core::num #t11 = x;
|
||||
|
@ -44,9 +36,7 @@ static method test2(core::num x) → dynamic {
|
|||
if(!(#t12 == null)) {
|
||||
final core::num #t13 = #t12;
|
||||
if(#t13 is core::String) {
|
||||
{
|
||||
core::String y = #t13{core::String};
|
||||
}
|
||||
core::String y = #t13{core::String};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,18 +6,14 @@ static method test1(dynamic x) → dynamic {
|
|||
final dynamic #t1 = x;
|
||||
final dynamic #t2 = #t1;
|
||||
if(!(#t2 == null)) {
|
||||
{
|
||||
dynamic y = #t2;
|
||||
}
|
||||
dynamic y = #t2;
|
||||
}
|
||||
final dynamic #t3 = x;
|
||||
final dynamic #t4 = #t3;
|
||||
if(!(#t4 == null)) {
|
||||
final dynamic #t5 = #t4;
|
||||
if(#t5 is core::int) {
|
||||
{
|
||||
core::int y = #t5{core::int};
|
||||
}
|
||||
core::int y = #t5{core::int};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -25,18 +21,14 @@ static method test2(core::num x) → dynamic {
|
|||
final core::num #t6 = x;
|
||||
final core::num #t7 = #t6;
|
||||
if(!(#t7 == null)) {
|
||||
{
|
||||
core::num y = #t7;
|
||||
}
|
||||
core::num y = #t7;
|
||||
}
|
||||
final core::num #t8 = x;
|
||||
final core::num #t9 = #t8;
|
||||
if(!(#t9 == null)) {
|
||||
final core::num #t10 = #t9;
|
||||
if(#t10 is core::int) {
|
||||
{
|
||||
core::int y = #t10{core::int};
|
||||
}
|
||||
core::int y = #t10{core::int};
|
||||
}
|
||||
}
|
||||
final core::num #t11 = x;
|
||||
|
@ -44,9 +36,7 @@ static method test2(core::num x) → dynamic {
|
|||
if(!(#t12 == null)) {
|
||||
final core::num #t13 = #t12;
|
||||
if(#t13 is core::String) {
|
||||
{
|
||||
core::String y = #t13{core::String};
|
||||
}
|
||||
core::String y = #t13{core::String};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,18 +6,14 @@ static method test1(dynamic x) → dynamic {
|
|||
final dynamic #t1 = x;
|
||||
final dynamic #t2 = #t1;
|
||||
if(!(#t2 == null)) {
|
||||
{
|
||||
dynamic y = #t2;
|
||||
}
|
||||
dynamic y = #t2;
|
||||
}
|
||||
final dynamic #t3 = x;
|
||||
final dynamic #t4 = #t3;
|
||||
if(!(#t4 == null)) {
|
||||
final dynamic #t5 = #t4;
|
||||
if(#t5 is core::int) {
|
||||
{
|
||||
core::int y = #t5{core::int};
|
||||
}
|
||||
core::int y = #t5{core::int};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -25,18 +21,14 @@ static method test2(core::num x) → dynamic {
|
|||
final core::num #t6 = x;
|
||||
final core::num #t7 = #t6;
|
||||
if(!(#t7 == null)) {
|
||||
{
|
||||
core::num y = #t7;
|
||||
}
|
||||
core::num y = #t7;
|
||||
}
|
||||
final core::num #t8 = x;
|
||||
final core::num #t9 = #t8;
|
||||
if(!(#t9 == null)) {
|
||||
final core::num #t10 = #t9;
|
||||
if(#t10 is core::int) {
|
||||
{
|
||||
core::int y = #t10{core::int};
|
||||
}
|
||||
core::int y = #t10{core::int};
|
||||
}
|
||||
}
|
||||
final core::num #t11 = x;
|
||||
|
@ -44,9 +36,7 @@ static method test2(core::num x) → dynamic {
|
|||
if(!(#t12 == null)) {
|
||||
final core::num #t13 = #t12;
|
||||
if(#t13 is core::String) {
|
||||
{
|
||||
core::String y = #t13{core::String};
|
||||
}
|
||||
core::String y = #t13{core::String};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -47,12 +47,10 @@ static method test(dynamic x) → dynamic {
|
|||
if(#t23 is core::double) {
|
||||
final core::Object #t24 = #t22!;
|
||||
if(#t24 is core::String) {
|
||||
core::double y = #t23{core::double};
|
||||
#t18 = false;
|
||||
{
|
||||
core::double y = #t23{core::double};
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -47,12 +47,10 @@ static method test(dynamic x) → dynamic {
|
|||
if(#t23 is core::double) {
|
||||
final core::Object #t24 = #t22!;
|
||||
if(#t24 is core::String) {
|
||||
core::double y = #t23{core::double};
|
||||
#t18 = false;
|
||||
{
|
||||
core::double y = #t23{core::double};
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -47,12 +47,10 @@ static method test(dynamic x) → dynamic {
|
|||
if(#t23 is core::double) {
|
||||
final core::Object #t24 = #t22!;
|
||||
if(#t24 is core::String) {
|
||||
core::double y = #t23{core::double};
|
||||
#t18 = false;
|
||||
{
|
||||
core::double y = #t23{core::double};
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -47,12 +47,10 @@ static method test(dynamic x) → dynamic {
|
|||
if(#t23 is core::double) {
|
||||
final core::Object #t24 = #t22!;
|
||||
if(#t24 is core::String) {
|
||||
core::double y = #t23{core::double};
|
||||
#t18 = false;
|
||||
{
|
||||
core::double y = #t23{core::double};
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -47,12 +47,10 @@ static method test(dynamic x) → dynamic {
|
|||
if(#t23 is core::double) {
|
||||
final core::Object #t24 = #t22!;
|
||||
if(#t24 is core::String) {
|
||||
core::double y = #t23{core::double};
|
||||
#t18 = false;
|
||||
{
|
||||
core::double y = #t23{core::double};
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -47,12 +47,10 @@ static method test1(core::Record x) → dynamic {
|
|||
if(#t23 is core::double) {
|
||||
final core::Object #t24 = #t22!;
|
||||
if(#t24 is core::String) {
|
||||
core::double y = #t23{core::double};
|
||||
#t18 = false;
|
||||
{
|
||||
core::double y = #t23{core::double};
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -104,12 +102,10 @@ static method test5((core::int, core::double, {required bar: dynamic, required f
|
|||
if(#t47 is core::double) {
|
||||
final core::Object #t48 = #t46!;
|
||||
if(#t48 is core::String) {
|
||||
core::double y = #t47{core::double};
|
||||
#t42 = false;
|
||||
{
|
||||
core::double y = #t47{core::double};
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -47,12 +47,10 @@ static method test1(core::Record x) → dynamic {
|
|||
if(#t23 is core::double) {
|
||||
final core::Object #t24 = #t22!;
|
||||
if(#t24 is core::String) {
|
||||
core::double y = #t23{core::double};
|
||||
#t18 = false;
|
||||
{
|
||||
core::double y = #t23{core::double};
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -104,12 +102,10 @@ static method test5((core::int, core::double, {required bar: dynamic, required f
|
|||
if(#t47 is core::double) {
|
||||
final core::Object #t48 = #t46!;
|
||||
if(#t48 is core::String) {
|
||||
core::double y = #t47{core::double};
|
||||
#t42 = false;
|
||||
{
|
||||
core::double y = #t47{core::double};
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -47,12 +47,10 @@ static method test1(core::Record x) → dynamic {
|
|||
if(#t23 is core::double) {
|
||||
final core::Object #t24 = #t22!;
|
||||
if(#t24 is core::String) {
|
||||
core::double y = #t23{core::double};
|
||||
#t18 = false;
|
||||
{
|
||||
core::double y = #t23{core::double};
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -104,12 +102,10 @@ static method test5((core::int, core::double, {required bar: dynamic, required f
|
|||
if(#t47 is core::double) {
|
||||
final core::Object #t48 = #t46!;
|
||||
if(#t48 is core::String) {
|
||||
core::double y = #t47{core::double};
|
||||
#t42 = false;
|
||||
{
|
||||
core::double y = #t47{core::double};
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -47,12 +47,10 @@ static method test1(core::Record x) → dynamic {
|
|||
if(#t23 is core::double) {
|
||||
final core::Object #t24 = #t22!;
|
||||
if(#t24 is core::String) {
|
||||
core::double y = #t23{core::double};
|
||||
#t18 = false;
|
||||
{
|
||||
core::double y = #t23{core::double};
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -104,12 +102,10 @@ static method test5((core::int, core::double, {required bar: dynamic, required f
|
|||
if(#t47 is core::double) {
|
||||
final core::Object #t48 = #t46!;
|
||||
if(#t48 is core::String) {
|
||||
core::double y = #t47{core::double};
|
||||
#t42 = false;
|
||||
{
|
||||
core::double y = #t47{core::double};
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -47,12 +47,10 @@ static method test1(core::Record x) → dynamic {
|
|||
if(#t23 is core::double) {
|
||||
final core::Object #t24 = #t22!;
|
||||
if(#t24 is core::String) {
|
||||
core::double y = #t23{core::double};
|
||||
#t18 = false;
|
||||
{
|
||||
core::double y = #t23{core::double};
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -104,12 +102,10 @@ static method test5((core::int, core::double, {required bar: dynamic, required f
|
|||
if(#t47 is core::double) {
|
||||
final core::Object #t48 = #t46!;
|
||||
if(#t48 is core::String) {
|
||||
core::double y = #t47{core::double};
|
||||
#t42 = false;
|
||||
{
|
||||
core::double y = #t47{core::double};
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,20 +4,14 @@ import "dart:core" as core;
|
|||
|
||||
static method test(dynamic x1, dynamic x2) → dynamic {
|
||||
final dynamic #t1 = x1;
|
||||
{
|
||||
dynamic y = #t1;
|
||||
}
|
||||
dynamic y = #t1;
|
||||
final dynamic #t2 = x1;
|
||||
dynamic y = #t2;
|
||||
{
|
||||
dynamic y = #t2;
|
||||
final dynamic #t3 = x2;
|
||||
dynamic y = #t3;
|
||||
{
|
||||
final dynamic #t3 = x2;
|
||||
{
|
||||
dynamic y = #t3;
|
||||
{
|
||||
return y;
|
||||
}
|
||||
}
|
||||
return y;
|
||||
}
|
||||
}
|
||||
throw "Expected to never reach this line of the program.";
|
||||
|
|
|
@ -4,20 +4,14 @@ import "dart:core" as core;
|
|||
|
||||
static method test(dynamic x1, dynamic x2) → dynamic {
|
||||
final dynamic #t1 = x1;
|
||||
{
|
||||
dynamic y = #t1;
|
||||
}
|
||||
dynamic y = #t1;
|
||||
final dynamic #t2 = x1;
|
||||
dynamic y = #t2;
|
||||
{
|
||||
dynamic y = #t2;
|
||||
final dynamic #t3 = x2;
|
||||
dynamic y = #t3;
|
||||
{
|
||||
final dynamic #t3 = x2;
|
||||
{
|
||||
dynamic y = #t3;
|
||||
{
|
||||
return y;
|
||||
}
|
||||
}
|
||||
return y;
|
||||
}
|
||||
}
|
||||
throw "Expected to never reach this line of the program.";
|
||||
|
|
|
@ -4,20 +4,14 @@ import "dart:core" as core;
|
|||
|
||||
static method test(dynamic x1, dynamic x2) → dynamic {
|
||||
final dynamic #t1 = x1;
|
||||
{
|
||||
dynamic y = #t1;
|
||||
}
|
||||
dynamic y = #t1;
|
||||
final dynamic #t2 = x1;
|
||||
dynamic y = #t2;
|
||||
{
|
||||
dynamic y = #t2;
|
||||
final dynamic #t3 = x2;
|
||||
dynamic y = #t3;
|
||||
{
|
||||
final dynamic #t3 = x2;
|
||||
{
|
||||
dynamic y = #t3;
|
||||
{
|
||||
return y;
|
||||
}
|
||||
}
|
||||
return y;
|
||||
}
|
||||
}
|
||||
throw "Expected to never reach this line of the program.";
|
||||
|
|
|
@ -4,20 +4,14 @@ import "dart:core" as core;
|
|||
|
||||
static method test(dynamic x1, dynamic x2) → dynamic {
|
||||
final dynamic #t1 = x1;
|
||||
{
|
||||
dynamic y = #t1;
|
||||
}
|
||||
dynamic y = #t1;
|
||||
final dynamic #t2 = x1;
|
||||
dynamic y = #t2;
|
||||
{
|
||||
dynamic y = #t2;
|
||||
final dynamic #t3 = x2;
|
||||
dynamic y = #t3;
|
||||
{
|
||||
final dynamic #t3 = x2;
|
||||
{
|
||||
dynamic y = #t3;
|
||||
{
|
||||
return y;
|
||||
}
|
||||
}
|
||||
return y;
|
||||
}
|
||||
}
|
||||
throw "Expected to never reach this line of the program.";
|
||||
|
|
|
@ -4,20 +4,14 @@ import "dart:core" as core;
|
|||
|
||||
static method test(dynamic x1, dynamic x2) → dynamic {
|
||||
final dynamic #t1 = x1;
|
||||
{
|
||||
dynamic y = #t1;
|
||||
}
|
||||
dynamic y = #t1;
|
||||
final dynamic #t2 = x1;
|
||||
dynamic y = #t2;
|
||||
{
|
||||
dynamic y = #t2;
|
||||
final dynamic #t3 = x2;
|
||||
dynamic y = #t3;
|
||||
{
|
||||
final dynamic #t3 = x2;
|
||||
{
|
||||
dynamic y = #t3;
|
||||
{
|
||||
return y;
|
||||
}
|
||||
}
|
||||
return y;
|
||||
}
|
||||
}
|
||||
throw "Expected to never reach this line of the program.";
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
test(dynamic x) {
|
||||
if (x case [int a] when a > 0) {
|
||||
return a;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
main() {
|
||||
expectEquals(1, test([1]));
|
||||
expectEquals(0, test([0]));
|
||||
expectEquals(0, test([-1]));
|
||||
}
|
||||
|
||||
expectEquals(x, y) {
|
||||
if (x != y) {
|
||||
throw "Expected ${x} to be equal to ${y}.";
|
||||
}
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
library /*isNonNullableByDefault*/;
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
static method test(dynamic x) → dynamic {
|
||||
final dynamic #t1 = x;
|
||||
final dynamic #t2 = #t1;
|
||||
if(#t2 is core::List<dynamic> && #t2{core::List<dynamic>}.{core::List::length}{core::int}.{core::num::==}(1){(core::Object) → core::bool}) {
|
||||
final dynamic #t3 = #t2{core::List<dynamic>}.{core::List::[]}(0){(core::int) → dynamic};
|
||||
final dynamic #t4 = #t3;
|
||||
if(#t4 is core::int) {
|
||||
core::int a = #t4{core::int};
|
||||
if(a.{core::num::>}(0){(core::num) → core::bool}) {
|
||||
{
|
||||
return a;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
static method main() → dynamic {
|
||||
self::expectEquals(1, self::test(<core::int>[1]));
|
||||
self::expectEquals(0, self::test(<core::int>[0]));
|
||||
self::expectEquals(0, self::test(<core::int>[1.{core::int::unary-}(){() → core::int}]));
|
||||
}
|
||||
static method expectEquals(dynamic x, dynamic y) → dynamic {
|
||||
if(!(x =={core::Object::==}{(core::Object) → core::bool} y)) {
|
||||
throw "Expected ${x} to be equal to ${y}.";
|
||||
}
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
library /*isNonNullableByDefault*/;
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
static method test(dynamic x) → dynamic {
|
||||
final dynamic #t1 = x;
|
||||
final dynamic #t2 = #t1;
|
||||
if(#t2 is core::List<dynamic> && #t2{core::List<dynamic>}.{core::List::length}{core::int}.{core::num::==}(1){(core::Object) → core::bool}) {
|
||||
final dynamic #t3 = #t2{core::List<dynamic>}.{core::List::[]}(0){(core::int) → dynamic};
|
||||
final dynamic #t4 = #t3;
|
||||
if(#t4 is core::int) {
|
||||
core::int a = #t4{core::int};
|
||||
if(a.{core::num::>}(0){(core::num) → core::bool}) {
|
||||
{
|
||||
return a;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
static method main() → dynamic {
|
||||
self::expectEquals(1, self::test(core::_GrowableList::_literal1<core::int>(1)));
|
||||
self::expectEquals(0, self::test(core::_GrowableList::_literal1<core::int>(0)));
|
||||
self::expectEquals(0, self::test(core::_GrowableList::_literal1<core::int>(1.{core::int::unary-}(){() → core::int})));
|
||||
}
|
||||
static method expectEquals(dynamic x, dynamic y) → dynamic {
|
||||
if(!(x =={core::Object::==}{(core::Object) → core::bool} y)) {
|
||||
throw "Expected ${x} to be equal to ${y}.";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Extra constant evaluation status:
|
||||
Evaluated: InstanceInvocation @ org-dartlang-testcase:///simple_guard_clause_runtime_test.dart:15:25 -> IntConstant(-1)
|
||||
Extra constant evaluation: evaluated: 35, effectively constant: 1
|
|
@ -0,0 +1,3 @@
|
|||
test(dynamic x) {}
|
||||
main() {}
|
||||
expectEquals(x, y) {}
|
|
@ -0,0 +1,3 @@
|
|||
expectEquals(x, y) {}
|
||||
main() {}
|
||||
test(dynamic x) {}
|
|
@ -0,0 +1,31 @@
|
|||
library /*isNonNullableByDefault*/;
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
static method test(dynamic x) → dynamic {
|
||||
final dynamic #t1 = x;
|
||||
final dynamic #t2 = #t1;
|
||||
if(#t2 is core::List<dynamic> && #t2{core::List<dynamic>}.{core::List::length}{core::int}.{core::num::==}(1){(core::Object) → core::bool}) {
|
||||
final dynamic #t3 = #t2{core::List<dynamic>}.{core::List::[]}(0){(core::int) → dynamic};
|
||||
final dynamic #t4 = #t3;
|
||||
if(#t4 is core::int) {
|
||||
core::int a = #t4{core::int};
|
||||
if(a.{core::num::>}(0){(core::num) → core::bool}) {
|
||||
{
|
||||
return a;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
static method main() → dynamic {
|
||||
self::expectEquals(1, self::test(<core::int>[1]));
|
||||
self::expectEquals(0, self::test(<core::int>[0]));
|
||||
self::expectEquals(0, self::test(<core::int>[1.{core::int::unary-}(){() → core::int}]));
|
||||
}
|
||||
static method expectEquals(dynamic x, dynamic y) → dynamic {
|
||||
if(!(x =={core::Object::==}{(core::Object) → core::bool} y)) {
|
||||
throw "Expected ${x} to be equal to ${y}.";
|
||||
}
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
library /*isNonNullableByDefault*/;
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
static method test(dynamic x) → dynamic {
|
||||
final dynamic #t1 = x;
|
||||
final dynamic #t2 = #t1;
|
||||
if(#t2 is core::List<dynamic> && #t2{core::List<dynamic>}.{core::List::length}{core::int}.{core::num::==}(1){(core::Object) → core::bool}) {
|
||||
final dynamic #t3 = #t2{core::List<dynamic>}.{core::List::[]}(0){(core::int) → dynamic};
|
||||
final dynamic #t4 = #t3;
|
||||
if(#t4 is core::int) {
|
||||
core::int a = #t4{core::int};
|
||||
if(a.{core::num::>}(0){(core::num) → core::bool}) {
|
||||
{
|
||||
return a;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
static method main() → dynamic {
|
||||
self::expectEquals(1, self::test(<core::int>[1]));
|
||||
self::expectEquals(0, self::test(<core::int>[0]));
|
||||
self::expectEquals(0, self::test(<core::int>[1.{core::int::unary-}(){() → core::int}]));
|
||||
}
|
||||
static method expectEquals(dynamic x, dynamic y) → dynamic {
|
||||
if(!(x =={core::Object::==}{(core::Object) → core::bool} y)) {
|
||||
throw "Expected ${x} to be equal to ${y}.";
|
||||
}
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
library /*isNonNullableByDefault*/;
|
||||
import self as self;
|
||||
|
||||
static method test(dynamic x) → dynamic
|
||||
;
|
||||
static method main() → dynamic
|
||||
;
|
||||
static method expectEquals(dynamic x, dynamic y) → dynamic
|
||||
;
|
|
@ -0,0 +1,36 @@
|
|||
library /*isNonNullableByDefault*/;
|
||||
import self as self;
|
||||
import "dart:core" as core;
|
||||
|
||||
static method test(dynamic x) → dynamic {
|
||||
final dynamic #t1 = x;
|
||||
final dynamic #t2 = #t1;
|
||||
if(#t2 is core::List<dynamic> && #t2{core::List<dynamic>}.{core::List::length}{core::int}.{core::num::==}(1){(core::Object) → core::bool}) {
|
||||
final dynamic #t3 = #t2{core::List<dynamic>}.{core::List::[]}(0){(core::int) → dynamic};
|
||||
final dynamic #t4 = #t3;
|
||||
if(#t4 is core::int) {
|
||||
core::int a = #t4{core::int};
|
||||
if(a.{core::num::>}(0){(core::num) → core::bool}) {
|
||||
{
|
||||
return a;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
static method main() → dynamic {
|
||||
self::expectEquals(1, self::test(core::_GrowableList::_literal1<core::int>(1)));
|
||||
self::expectEquals(0, self::test(core::_GrowableList::_literal1<core::int>(0)));
|
||||
self::expectEquals(0, self::test(core::_GrowableList::_literal1<core::int>(1.{core::int::unary-}(){() → core::int})));
|
||||
}
|
||||
static method expectEquals(dynamic x, dynamic y) → dynamic {
|
||||
if(!(x =={core::Object::==}{(core::Object) → core::bool} y)) {
|
||||
throw "Expected ${x} to be equal to ${y}.";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Extra constant evaluation status:
|
||||
Evaluated: InstanceInvocation @ org-dartlang-testcase:///simple_guard_clause_runtime_test.dart:15:25 -> IntConstant(-1)
|
||||
Extra constant evaluation: evaluated: 35, effectively constant: 1
|
|
@ -10,12 +10,10 @@ static method test1(dynamic x) → dynamic {
|
|||
final dynamic #t4 = #t3{core::List<dynamic>}.{core::List::[]}(0){(core::int) → dynamic};
|
||||
final dynamic #t5 = #t4;
|
||||
if(#t5 is core::int) {
|
||||
core::int y = #t5{core::int};
|
||||
#t2 = false;
|
||||
{
|
||||
core::int y = #t5{core::int};
|
||||
{
|
||||
return y;
|
||||
}
|
||||
return y;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -31,12 +29,10 @@ static method test2(dynamic x) → dynamic {
|
|||
final dynamic #t9 = #t8{core::List<dynamic>}.{core::List::[]}(0){(core::int) → dynamic};
|
||||
final dynamic #t10 = #t9;
|
||||
if(#t10 is core::int) {
|
||||
core::int y = #t10{core::int};
|
||||
#t7 = false;
|
||||
{
|
||||
core::int y = #t10{core::int};
|
||||
{
|
||||
return y;
|
||||
}
|
||||
return y;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -52,12 +48,10 @@ static method test3(dynamic x) → dynamic {
|
|||
final dynamic #t14 = #t13{core::List<dynamic>}.{core::List::[]}(#t13{core::List<dynamic>}.{core::List::length}{core::int}.{core::num::-}(1){(core::num) → core::num}){(core::int) → dynamic};
|
||||
final dynamic #t15 = #t14;
|
||||
if(#t15 is core::int) {
|
||||
core::int y = #t15{core::int};
|
||||
#t12 = false;
|
||||
{
|
||||
core::int y = #t15{core::int};
|
||||
{
|
||||
return y;
|
||||
}
|
||||
return y;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,12 +10,10 @@ static method test1(dynamic x) → dynamic {
|
|||
final dynamic #t4 = #t3{core::List<dynamic>}.{core::List::[]}(0){(core::int) → dynamic};
|
||||
final dynamic #t5 = #t4;
|
||||
if(#t5 is core::int) {
|
||||
core::int y = #t5{core::int};
|
||||
#t2 = false;
|
||||
{
|
||||
core::int y = #t5{core::int};
|
||||
{
|
||||
return y;
|
||||
}
|
||||
return y;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -31,12 +29,10 @@ static method test2(dynamic x) → dynamic {
|
|||
final dynamic #t9 = #t8{core::List<dynamic>}.{core::List::[]}(0){(core::int) → dynamic};
|
||||
final dynamic #t10 = #t9;
|
||||
if(#t10 is core::int) {
|
||||
core::int y = #t10{core::int};
|
||||
#t7 = false;
|
||||
{
|
||||
core::int y = #t10{core::int};
|
||||
{
|
||||
return y;
|
||||
}
|
||||
return y;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -52,12 +48,10 @@ static method test3(dynamic x) → dynamic {
|
|||
final dynamic #t14 = #t13{core::List<dynamic>}.{core::List::[]}(#t13{core::List<dynamic>}.{core::List::length}{core::int}.{core::num::-}(1){(core::num) → core::num}){(core::int) → dynamic};
|
||||
final dynamic #t15 = #t14;
|
||||
if(#t15 is core::int) {
|
||||
core::int y = #t15{core::int};
|
||||
#t12 = false;
|
||||
{
|
||||
core::int y = #t15{core::int};
|
||||
{
|
||||
return y;
|
||||
}
|
||||
return y;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,12 +10,10 @@ static method test1(dynamic x) → dynamic {
|
|||
final dynamic #t4 = #t3{core::List<dynamic>}.{core::List::[]}(0){(core::int) → dynamic};
|
||||
final dynamic #t5 = #t4;
|
||||
if(#t5 is core::int) {
|
||||
core::int y = #t5{core::int};
|
||||
#t2 = false;
|
||||
{
|
||||
core::int y = #t5{core::int};
|
||||
{
|
||||
return y;
|
||||
}
|
||||
return y;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -31,12 +29,10 @@ static method test2(dynamic x) → dynamic {
|
|||
final dynamic #t9 = #t8{core::List<dynamic>}.{core::List::[]}(0){(core::int) → dynamic};
|
||||
final dynamic #t10 = #t9;
|
||||
if(#t10 is core::int) {
|
||||
core::int y = #t10{core::int};
|
||||
#t7 = false;
|
||||
{
|
||||
core::int y = #t10{core::int};
|
||||
{
|
||||
return y;
|
||||
}
|
||||
return y;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -52,12 +48,10 @@ static method test3(dynamic x) → dynamic {
|
|||
final dynamic #t14 = #t13{core::List<dynamic>}.{core::List::[]}(#t13{core::List<dynamic>}.{core::List::length}{core::int}.{core::num::-}(1){(core::num) → core::num}){(core::int) → dynamic};
|
||||
final dynamic #t15 = #t14;
|
||||
if(#t15 is core::int) {
|
||||
core::int y = #t15{core::int};
|
||||
#t12 = false;
|
||||
{
|
||||
core::int y = #t15{core::int};
|
||||
{
|
||||
return y;
|
||||
}
|
||||
return y;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,12 +10,10 @@ static method test1(dynamic x) → dynamic {
|
|||
final dynamic #t4 = #t3{core::List<dynamic>}.{core::List::[]}(0){(core::int) → dynamic};
|
||||
final dynamic #t5 = #t4;
|
||||
if(#t5 is core::int) {
|
||||
core::int y = #t5{core::int};
|
||||
#t2 = false;
|
||||
{
|
||||
core::int y = #t5{core::int};
|
||||
{
|
||||
return y;
|
||||
}
|
||||
return y;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -31,12 +29,10 @@ static method test2(dynamic x) → dynamic {
|
|||
final dynamic #t9 = #t8{core::List<dynamic>}.{core::List::[]}(0){(core::int) → dynamic};
|
||||
final dynamic #t10 = #t9;
|
||||
if(#t10 is core::int) {
|
||||
core::int y = #t10{core::int};
|
||||
#t7 = false;
|
||||
{
|
||||
core::int y = #t10{core::int};
|
||||
{
|
||||
return y;
|
||||
}
|
||||
return y;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -52,12 +48,10 @@ static method test3(dynamic x) → dynamic {
|
|||
final dynamic #t14 = #t13{core::List<dynamic>}.{core::List::[]}(#t13{core::List<dynamic>}.{core::List::length}{core::int}.{core::num::-}(1){(core::num) → core::num}){(core::int) → dynamic};
|
||||
final dynamic #t15 = #t14;
|
||||
if(#t15 is core::int) {
|
||||
core::int y = #t15{core::int};
|
||||
#t12 = false;
|
||||
{
|
||||
core::int y = #t15{core::int};
|
||||
{
|
||||
return y;
|
||||
}
|
||||
return y;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue