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

Side by Side Diff: pkg/analyzer/test/src/summary/resynthesize_test.dart

Issue 1695773002: Resynthesize positional/named parameters as DefaultParameterElementImpl. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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
« no previous file with comments | « pkg/analyzer/lib/src/summary/resynthesize.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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 test.src.serialization.elements_test; 5 library test.src.serialization.elements_test;
6 6
7 import 'dart:convert'; 7 import 'dart:convert';
8 8
9 import 'package:analyzer/dart/ast/ast.dart'; 9 import 'package:analyzer/dart/ast/ast.dart';
10 import 'package:analyzer/dart/element/element.dart'; 10 import 'package:analyzer/dart/element/element.dart';
(...skipping 1564 matching lines...) Expand 10 before | Expand all | Expand 10 after
1575 } 1575 }
1576 '''); 1576 ''');
1577 } 1577 }
1578 1578
1579 test_const_parameterDefaultValue_normal() { 1579 test_const_parameterDefaultValue_normal() {
1580 checkLibrary(r''' 1580 checkLibrary(r'''
1581 class C { 1581 class C {
1582 const C.positional([p = 1 + 2]); 1582 const C.positional([p = 1 + 2]);
1583 const C.named({p: 1 + 2}); 1583 const C.named({p: 1 + 2});
1584 void methodPositional([p = 1 + 2]) {} 1584 void methodPositional([p = 1 + 2]) {}
1585 void methodPositionalWithoutDefault([p]) {}
1585 void methodNamed({p: 1 + 2}) {} 1586 void methodNamed({p: 1 + 2}) {}
1587 void methodNamedWithoutDefault({p}) {}
1586 } 1588 }
1587 '''); 1589 ''');
1588 } 1590 }
1589 1591
1590 test_const_reference_staticField() { 1592 test_const_reference_staticField() {
1591 checkLibrary(r''' 1593 checkLibrary(r'''
1592 class C { 1594 class C {
1593 static const int F = 42; 1595 static const int F = 42;
1594 } 1596 }
1595 const V = C.F; 1597 const V = C.F;
(...skipping 1812 matching lines...) Expand 10 before | Expand all | Expand 10 after
3408 fail('Unexpectedly tried to get unlinked summary for $uri'); 3410 fail('Unexpectedly tried to get unlinked summary for $uri');
3409 } 3411 }
3410 return serializedUnit; 3412 return serializedUnit;
3411 } 3413 }
3412 3414
3413 @override 3415 @override
3414 bool hasLibrarySummary(String uri) { 3416 bool hasLibrarySummary(String uri) {
3415 return true; 3417 return true;
3416 } 3418 }
3417 } 3419 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/summary/resynthesize.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698