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

Side by Side Diff: pkg/analyzer/test/generated/incremental_resolver_test.dart

Issue 1078953002: Issue 23155. Don't perform incremental resolution if a constructor initializer is changed. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « pkg/analyzer/lib/src/generated/incremental_resolver.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library engine.incremental_resolver_test; 5 library engine.incremental_resolver_test;
6 6
7 import 'package:analyzer/src/generated/ast.dart'; 7 import 'package:analyzer/src/generated/ast.dart';
8 import 'package:analyzer/src/generated/element.dart'; 8 import 'package:analyzer/src/generated/element.dart';
9 import 'package:analyzer/src/generated/engine.dart'; 9 import 'package:analyzer/src/generated/engine.dart';
10 import 'package:analyzer/src/generated/error.dart'; 10 import 'package:analyzer/src/generated/error.dart';
(...skipping 3180 matching lines...) Expand 10 before | Expand all | Expand 10 after
3191 print(0); 3191 print(0);
3192 } 3192 }
3193 '''); 3193 ''');
3194 _updateAndValidate(r''' 3194 _updateAndValidate(r'''
3195 main() { 3195 main() {
3196 print(0); 3196 print(0);
3197 } 3197 }
3198 '''); 3198 ''');
3199 } 3199 }
3200 3200
3201 void test_false_constConstructor_initializer() {
3202 _resolveUnit(r'''
3203 class C {
3204 final int x;
3205 const C(this.x);
3206 const C.foo() : x = 0;
3207 }
3208 main() {
3209 const {const C(0): 0, const C.foo(): 1};
3210 }
3211 ''');
3212 _updateAndValidate(r'''
3213 class C {
3214 final int x;
3215 const C(this.x);
3216 const C.foo() : x = 1;
3217 }
3218 main() {
3219 const {const C(0): 0, const C.foo(): 1};
3220 }
3221 ''', expectedSuccess: false);
3222 }
3223
3201 void test_false_topLevelFunction_name() { 3224 void test_false_topLevelFunction_name() {
3202 _resolveUnit(r''' 3225 _resolveUnit(r'''
3203 a() {} 3226 a() {}
3204 b() {} 3227 b() {}
3205 '''); 3228 ''');
3206 _updateAndValidate(r''' 3229 _updateAndValidate(r'''
3207 a() {} 3230 a() {}
3208 bb() {} 3231 bb() {}
3209 ''', expectedSuccess: false); 3232 ''', expectedSuccess: false);
3210 } 3233 }
(...skipping 865 matching lines...) Expand 10 before | Expand all | Expand 10 after
4076 return ResolutionContextBuilder.contextFor(node, listener).scope; 4099 return ResolutionContextBuilder.contextFor(node, listener).scope;
4077 } 4100 }
4078 } 4101 }
4079 4102
4080 class _Edit { 4103 class _Edit {
4081 final int offset; 4104 final int offset;
4082 final int length; 4105 final int length;
4083 final String replacement; 4106 final String replacement;
4084 _Edit(this.offset, this.length, this.replacement); 4107 _Edit(this.offset, this.length, this.replacement);
4085 } 4108 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/generated/incremental_resolver.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698