-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Cherry-pick refs/changes/85/211085/1 to stable * Cherry-pick refs/changes/65/213265/1 to stable * Cherry-pick refs/changes/43/213043/1 to stable * Cherry-pick a6f97d1 to stable
- Loading branch information
Showing
42 changed files
with
2,431 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
pkg/front_end/parser_testcases/no-triple-shift/define_triple_shift_method.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
class Foo { | ||
Foo operator >>>(_) => this; | ||
} | ||
|
||
main() { | ||
Foo foo = new Foo(); | ||
foo >>> 42; | ||
print(foo >>> 42); | ||
print(foo >>>= 42); | ||
if ((foo >>>= 42) == foo) { | ||
print("same"); | ||
} | ||
} |
164 changes: 164 additions & 0 deletions
164
pkg/front_end/parser_testcases/no-triple-shift/define_triple_shift_method.dart.expect
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,164 @@ | ||
Problems reported: | ||
|
||
parser/no-triple-shift/define_triple_shift_method:2:16: This requires the 'triple-shift' language feature to be enabled. | ||
Foo operator >>>(_) => this; | ||
^^^ | ||
|
||
parser/no-triple-shift/define_triple_shift_method:7:7: This requires the 'triple-shift' language feature to be enabled. | ||
foo >>> 42; | ||
^^^ | ||
|
||
parser/no-triple-shift/define_triple_shift_method:8:13: This requires the 'triple-shift' language feature to be enabled. | ||
print(foo >>> 42); | ||
^^^ | ||
|
||
parser/no-triple-shift/define_triple_shift_method:9:13: This requires the 'triple-shift' language feature to be enabled. | ||
print(foo >>>= 42); | ||
^^^^ | ||
|
||
parser/no-triple-shift/define_triple_shift_method:10:12: This requires the 'triple-shift' language feature to be enabled. | ||
if ((foo >>>= 42) == foo) { | ||
^^^^ | ||
|
||
beginCompilationUnit(class) | ||
beginMetadataStar(class) | ||
endMetadataStar(0) | ||
beginClassOrNamedMixinApplicationPrelude(class) | ||
handleIdentifier(Foo, classOrMixinDeclaration) | ||
handleNoTypeVariables({) | ||
beginClassDeclaration(class, null, Foo) | ||
handleNoType(Foo) | ||
handleClassExtends(null, 1) | ||
handleClassNoWithClause() | ||
handleClassOrMixinImplements(null, 0) | ||
handleClassHeader(class, class, null) | ||
beginClassOrMixinBody(DeclarationKind.Class, {) | ||
beginMetadataStar(Foo) | ||
endMetadataStar(0) | ||
beginMember() | ||
handleRecoverableError(Message[ExperimentNotEnabled, This requires the 'triple-shift' language feature to be enabled., Try updating your pubspec.yaml to set the minimum SDK constraint to 2.14 or higher, and running 'pub get'., {string: triple-shift, string2: 2.14}], >>, >) | ||
beginMethod(null, null, null, null, null, operator) | ||
handleIdentifier(Foo, typeReference) | ||
handleNoTypeArguments(operator) | ||
handleType(Foo, null) | ||
handleOperatorName(operator, >>>) | ||
handleNoTypeVariables(() | ||
beginFormalParameters((, MemberKind.NonStaticMethod) | ||
beginMetadataStar(_) | ||
endMetadataStar(0) | ||
beginFormalParameter(_, MemberKind.NonStaticMethod, null, null, null) | ||
handleNoType(() | ||
handleIdentifier(_, formalParameterDeclaration) | ||
handleFormalParameterWithoutValue()) | ||
endFormalParameter(null, null, _, null, null, FormalParameterKind.mandatory, MemberKind.NonStaticMethod) | ||
endFormalParameters(1, (, ), MemberKind.NonStaticMethod) | ||
handleNoInitializers() | ||
handleAsyncModifier(null, null) | ||
handleThisExpression(this, expression) | ||
handleExpressionFunctionBody(=>, ;) | ||
endClassMethod(null, Foo, (, null, ;) | ||
endMember() | ||
endClassOrMixinBody(DeclarationKind.Class, 1, {, }) | ||
endClassDeclaration(class, }) | ||
endTopLevelDeclaration(main) | ||
beginMetadataStar(main) | ||
endMetadataStar(0) | ||
beginTopLevelMember(main) | ||
beginTopLevelMethod(}, null) | ||
handleNoType(}) | ||
handleIdentifier(main, topLevelFunctionDeclaration) | ||
handleNoTypeVariables(() | ||
beginFormalParameters((, MemberKind.TopLevelMethod) | ||
endFormalParameters(0, (, ), MemberKind.TopLevelMethod) | ||
handleAsyncModifier(null, null) | ||
beginBlockFunctionBody({) | ||
beginMetadataStar(Foo) | ||
endMetadataStar(0) | ||
handleIdentifier(Foo, typeReference) | ||
handleNoTypeArguments(foo) | ||
handleType(Foo, null) | ||
beginVariablesDeclaration(foo, null, null) | ||
handleIdentifier(foo, localVariableDeclaration) | ||
beginInitializedIdentifier(foo) | ||
beginVariableInitializer(=) | ||
beginNewExpression(new) | ||
handleIdentifier(Foo, constructorReference) | ||
beginConstructorReference(Foo) | ||
handleNoTypeArguments(() | ||
handleNoConstructorReferenceContinuationAfterTypeArguments(() | ||
endConstructorReference(Foo, null, () | ||
beginArguments(() | ||
endArguments(0, (, )) | ||
endNewExpression(new) | ||
endVariableInitializer(=) | ||
endInitializedIdentifier(foo) | ||
endVariablesDeclaration(1, ;) | ||
handleIdentifier(foo, expression) | ||
handleNoTypeArguments(>>) | ||
handleNoArguments(>>) | ||
handleSend(foo, >>) | ||
handleRecoverableError(Message[ExperimentNotEnabled, This requires the 'triple-shift' language feature to be enabled., Try updating your pubspec.yaml to set the minimum SDK constraint to 2.14 or higher, and running 'pub get'., {string: triple-shift, string2: 2.14}], >>, >) | ||
beginBinaryExpression(>>>) | ||
handleLiteralInt(42) | ||
endBinaryExpression(>>>) | ||
handleExpressionStatement(;) | ||
handleIdentifier(print, expression) | ||
handleNoTypeArguments(() | ||
beginArguments(() | ||
handleIdentifier(foo, expression) | ||
handleNoTypeArguments(>>) | ||
handleNoArguments(>>) | ||
handleSend(foo, >>) | ||
handleRecoverableError(Message[ExperimentNotEnabled, This requires the 'triple-shift' language feature to be enabled., Try updating your pubspec.yaml to set the minimum SDK constraint to 2.14 or higher, and running 'pub get'., {string: triple-shift, string2: 2.14}], >>, >) | ||
beginBinaryExpression(>>>) | ||
handleLiteralInt(42) | ||
endBinaryExpression(>>>) | ||
endArguments(1, (, )) | ||
handleSend(print, ;) | ||
handleExpressionStatement(;) | ||
handleIdentifier(print, expression) | ||
handleNoTypeArguments(() | ||
beginArguments(() | ||
handleIdentifier(foo, expression) | ||
handleNoTypeArguments(>>) | ||
handleNoArguments(>>) | ||
handleSend(foo, >>) | ||
handleRecoverableError(Message[ExperimentNotEnabled, This requires the 'triple-shift' language feature to be enabled., Try updating your pubspec.yaml to set the minimum SDK constraint to 2.14 or higher, and running 'pub get'., {string: triple-shift, string2: 2.14}], >>, >=) | ||
handleLiteralInt(42) | ||
handleAssignmentExpression(>>>=) | ||
endArguments(1, (, )) | ||
handleSend(print, ;) | ||
handleExpressionStatement(;) | ||
beginIfStatement(if) | ||
handleIdentifier(foo, expression) | ||
handleNoTypeArguments(>>) | ||
handleNoArguments(>>) | ||
handleSend(foo, >>) | ||
handleRecoverableError(Message[ExperimentNotEnabled, This requires the 'triple-shift' language feature to be enabled., Try updating your pubspec.yaml to set the minimum SDK constraint to 2.14 or higher, and running 'pub get'., {string: triple-shift, string2: 2.14}], >>, >=) | ||
handleLiteralInt(42) | ||
handleAssignmentExpression(>>>=) | ||
handleParenthesizedExpression(() | ||
beginBinaryExpression(==) | ||
handleIdentifier(foo, expression) | ||
handleNoTypeArguments()) | ||
handleNoArguments()) | ||
handleSend(foo, )) | ||
endBinaryExpression(==) | ||
handleParenthesizedCondition(() | ||
beginThenStatement({) | ||
beginBlock({, BlockKind(statement)) | ||
handleIdentifier(print, expression) | ||
handleNoTypeArguments(() | ||
beginArguments(() | ||
beginLiteralString("same") | ||
endLiteralString(0, )) | ||
endArguments(1, (, )) | ||
handleSend(print, ;) | ||
handleExpressionStatement(;) | ||
endBlock(1, {, }, BlockKind(statement)) | ||
endThenStatement(}) | ||
endIfStatement(if, null) | ||
endBlockFunctionBody(5, {, }) | ||
endTopLevelMethod(main, null, }) | ||
endTopLevelDeclaration() | ||
endCompilationUnit(2, ) |
Oops, something went wrong.