Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(94)

Unified Diff: pkg/analysis_server/test/services/correction/assist_test.dart

Issue 1415253002: Fix for 'Assign to Local Variable' in closures. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analysis_server/lib/src/services/correction/assist_internal.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/test/services/correction/assist_test.dart
diff --git a/pkg/analysis_server/test/services/correction/assist_test.dart b/pkg/analysis_server/test/services/correction/assist_test.dart
index 6d01cbbcc001a55636e1deb68da0799f5efaa1eb..2885f27d20e98ec703cb312d581197b21f0c9957 100644
--- a/pkg/analysis_server/test/services/correction/assist_test.dart
+++ b/pkg/analysis_server/test/services/correction/assist_test.dart
@@ -794,6 +794,26 @@ main() {
assertNoAssistAt('vvv =', DartAssistKind.ASSIGN_TO_LOCAL_VARIABLE);
}
+ void test_assignToLocalVariable_inClosure() {
+ resolveTestUnit(r'''
+main() {
+ print(() {
+ 12345;
+ });
+}
+''');
+ assertHasAssistAt(
+ '345',
+ DartAssistKind.ASSIGN_TO_LOCAL_VARIABLE,
+ '''
+main() {
+ print(() {
+ var i = 12345;
+ });
+}
+''');
+ }
+
void test_assignToLocalVariable_invocationArgument() {
resolveTestUnit(r'''
main() {
« no previous file with comments | « pkg/analysis_server/lib/src/services/correction/assist_internal.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698