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

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

Issue 837063002: Disable type propagation for class/top-level fields. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 11 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
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 2607 matching lines...) Expand 10 before | Expand all | Expand 10 after
2618 _resolveUnit(r''' 2618 _resolveUnit(r'''
2619 a() {} 2619 a() {}
2620 b() {} 2620 b() {}
2621 '''); 2621 ''');
2622 _updateAndValidate(r''' 2622 _updateAndValidate(r'''
2623 a() {} 2623 a() {}
2624 bb() {} 2624 bb() {}
2625 ''', expectedSuccess: false); 2625 ''', expectedSuccess: false);
2626 } 2626 }
2627 2627
2628 void test_fieldClassField_propagatedType() {
2629 _resolveUnit(r'''
2630 class A {
2631 static const A b = const B();
2632 const A();
2633 }
2634
2635 class B extends A {
2636 const B();
2637 }
2638
2639 main() {
2640 print(12);
2641 A.b;
2642 }
2643 ''');
2644 _updateAndValidate(r'''
2645 class A {
2646 static const A b = const B();
2647 const A();
2648 }
2649
2650 class B extends A {
2651 const B();
2652 }
2653
2654 main() {
2655 print(123);
2656 A.b;
2657 }
2658 ''');
2659 }
2660
2628 void test_inBody_expression() { 2661 void test_inBody_expression() {
2629 _resolveUnit(r''' 2662 _resolveUnit(r'''
2630 class A { 2663 class A {
2631 m() { 2664 m() {
2632 print(1); 2665 print(1);
2633 } 2666 }
2634 } 2667 }
2635 '''); 2668 ''');
2636 _updateAndValidate(r''' 2669 _updateAndValidate(r'''
2637 class A { 2670 class A {
(...skipping 726 matching lines...) Expand 10 before | Expand all | Expand 10 after
3364 } 3397 }
3365 } 3398 }
3366 3399
3367 3400
3368 class _Edit { 3401 class _Edit {
3369 final int offset; 3402 final int offset;
3370 final int length; 3403 final int length;
3371 final String replacement; 3404 final String replacement;
3372 _Edit(this.offset, this.length, this.replacement); 3405 _Edit(this.offset, this.length, this.replacement);
3373 } 3406 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/generated/resolver.dart ('k') | pkg/analyzer/test/generated/resolver_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698