Skip to content

Commit 8156563

Browse files
scheglovCommit Queue
authored andcommitted
Elements. Don't write 'default' modifier in text output.
Change-Id: I2743c194388c6b08be3047f44ff6d6a489d9515f Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/437584 Commit-Queue: Konstantin Shcheglov <[email protected]> Reviewed-by: Paul Berry <[email protected]>
1 parent 8f95ae5 commit 8156563

15 files changed

+114
-122
lines changed

pkg/analyzer/test/src/summary/element_text.dart

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -679,10 +679,6 @@ class _Element2Writer extends _AbstractElementWriter {
679679
_sink.write('optionalNamed ');
680680
}
681681

682-
if (e is ConstVariableFragment) {
683-
_sink.write('default ');
684-
}
685-
686682
_sink.writeIf(e.isConst, 'const ');
687683
_sink.writeIf(e.isCovariant, 'covariant ');
688684
_sink.writeIf(e.isFinal, 'final ');
@@ -742,10 +738,6 @@ class _Element2Writer extends _AbstractElementWriter {
742738
// _sink.write('optionalNamed ');
743739
// }
744740

745-
if (f is ConstVariableFragment) {
746-
_sink.write('default ');
747-
}
748-
749741
// _sink.writeIf(f.isConst, 'const ');
750742
// _sink.writeIf(f.isCovariant, 'covariant ');
751743
// _sink.writeIf(f.isFinal, 'final ');

pkg/analyzer/test/src/summary/elements/class_test.dart

Lines changed: 45 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1319,7 +1319,7 @@ library
13191319
typeName: C
13201320
typeNameOffset: 17
13211321
formalParameters
1322-
#F4 default this.x @25
1322+
#F4 this.x @25
13231323
element: <testLibrary>::@class::C::@constructor::new::@formalParameter::x
13241324
getters
13251325
#F5 synthetic x
@@ -1388,7 +1388,7 @@ library
13881388
typeName: C
13891389
typeNameOffset: 17
13901390
formalParameters
1391-
#F4 default this.x @25
1391+
#F4 this.x @25
13921392
element: <testLibrary>::@class::C::@constructor::new::@formalParameter::x
13931393
initializer: expression_0
13941394
IntegerLiteral
@@ -1464,7 +1464,7 @@ library
14641464
typeName: C
14651465
typeNameOffset: 17
14661466
formalParameters
1467-
#F4 default this.x @25
1467+
#F4 this.x @25
14681468
element: <testLibrary>::@class::C::@constructor::new::@formalParameter::x
14691469
getters
14701470
#F5 synthetic x
@@ -1533,7 +1533,7 @@ library
15331533
typeName: C
15341534
typeNameOffset: 17
15351535
formalParameters
1536-
#F4 default this.x @25
1536+
#F4 this.x @25
15371537
element: <testLibrary>::@class::C::@constructor::new::@formalParameter::x
15381538
initializer: expression_0
15391539
IntegerLiteral
@@ -1902,7 +1902,7 @@ library
19021902
typeName: A
19031903
typeNameOffset: 34
19041904
formalParameters
1905-
#F4 default f @41
1905+
#F4 f @41
19061906
element: <testLibrary>::@class::A::@constructor::new::@formalParameter::f
19071907
initializer: expression_0
19081908
IntegerLiteral
@@ -2448,7 +2448,7 @@ library
24482448
formalParameters
24492449
#F3 a @24
24502450
element: <testLibrary>::@class::A::@constructor::aaa::@formalParameter::a
2451-
#F4 default b @32
2451+
#F4 b @32
24522452
element: <testLibrary>::@class::A::@constructor::aaa::@formalParameter::b
24532453
#F5 class C @45
24542454
element: <testLibrary>::@class::C
@@ -2740,7 +2740,7 @@ library
27402740
formalParameters
27412741
#F4 a @61
27422742
element: <testLibrary>::@class::C::@constructor::named::@formalParameter::a
2743-
#F5 default b @69
2743+
#F5 b @69
27442744
element: <testLibrary>::@class::C::@constructor::named::@formalParameter::b
27452745
classes
27462746
class C
@@ -3108,9 +3108,9 @@ library
31083108
typeName: A
31093109
typeNameOffset: 12
31103110
formalParameters
3111-
#F3 default a @28
3111+
#F3 a @28
31123112
element: <testLibrary>::@class::A::@constructor::new::@formalParameter::a
3113-
#F4 default b @47
3113+
#F4 b @47
31143114
element: <testLibrary>::@class::A::@constructor::new::@formalParameter::b
31153115
#F5 class B @61
31163116
element: <testLibrary>::@class::B
@@ -3120,13 +3120,13 @@ library
31203120
typeName: B
31213121
typeNameOffset: 77
31223122
formalParameters
3123-
#F7 default o1 @87
3123+
#F7 o1 @87
31243124
element: <testLibrary>::@class::B::@constructor::new::@formalParameter::o1
3125-
#F8 default super.a @97
3125+
#F8 super.a @97
31263126
element: <testLibrary>::@class::B::@constructor::new::@formalParameter::a
3127-
#F9 default o2 @107
3127+
#F9 o2 @107
31283128
element: <testLibrary>::@class::B::@constructor::new::@formalParameter::o2
3129-
#F10 default super.b @117
3129+
#F10 super.b @117
31303130
element: <testLibrary>::@class::B::@constructor::new::@formalParameter::b
31313131
classes
31323132
class A
@@ -3194,7 +3194,7 @@ library
31943194
typeName: A
31953195
typeNameOffset: 12
31963196
formalParameters
3197-
#F3 default a @19
3197+
#F3 a @19
31983198
element: <testLibrary>::@class::A::@constructor::new::@formalParameter::a
31993199
initializer: expression_0
32003200
IntegerLiteral
@@ -3208,7 +3208,7 @@ library
32083208
typeName: B
32093209
typeNameOffset: 53
32103210
formalParameters
3211-
#F6 default super.a @62
3211+
#F6 super.a @62
32123212
element: <testLibrary>::@class::B::@constructor::new::@formalParameter::a
32133213
classes
32143214
class A
@@ -3266,7 +3266,7 @@ library
32663266
typeName: A
32673267
typeNameOffset: 12
32683268
formalParameters
3269-
#F3 default a @28
3269+
#F3 a @28
32703270
element: <testLibrary>::@class::A::@constructor::new::@formalParameter::a
32713271
#F4 class B @42
32723272
element: <testLibrary>::@class::B
@@ -3276,7 +3276,7 @@ library
32763276
typeName: B
32773277
typeNameOffset: 58
32783278
formalParameters
3279-
#F6 default super.b @67
3279+
#F6 super.b @67
32803280
element: <testLibrary>::@class::B::@constructor::new::@formalParameter::b
32813281
classes
32823282
class A
@@ -3341,7 +3341,7 @@ library
33413341
typeName: B
33423342
typeNameOffset: 47
33433343
formalParameters
3344-
#F6 default super.a @56
3344+
#F6 super.a @56
33453345
element: <testLibrary>::@class::B::@constructor::new::@formalParameter::a
33463346
classes
33473347
class A
@@ -3408,13 +3408,13 @@ library
34083408
typeName: B
34093409
typeNameOffset: 57
34103410
formalParameters
3411-
#F7 default o1 @67
3411+
#F7 o1 @67
34123412
element: <testLibrary>::@class::B::@constructor::new::@formalParameter::o1
3413-
#F8 default super.a @77
3413+
#F8 super.a @77
34143414
element: <testLibrary>::@class::B::@constructor::new::@formalParameter::a
3415-
#F9 default o2 @87
3415+
#F9 o2 @87
34163416
element: <testLibrary>::@class::B::@constructor::new::@formalParameter::o2
3417-
#F10 default super.b @97
3417+
#F10 super.b @97
34183418
element: <testLibrary>::@class::B::@constructor::new::@formalParameter::b
34193419
classes
34203420
class A
@@ -3486,9 +3486,9 @@ library
34863486
typeName: A
34873487
typeNameOffset: 12
34883488
formalParameters
3489-
#F3 default a @28
3489+
#F3 a @28
34903490
element: <testLibrary>::@class::A::@constructor::new::@formalParameter::a
3491-
#F4 default b @47
3491+
#F4 b @47
34923492
element: <testLibrary>::@class::A::@constructor::new::@formalParameter::b
34933493
#F5 class B @61
34943494
element: <testLibrary>::@class::B
@@ -3498,13 +3498,13 @@ library
34983498
typeName: B
34993499
typeNameOffset: 77
35003500
formalParameters
3501-
#F7 default o1 @101
3501+
#F7 o1 @101
35023502
element: <testLibrary>::@class::B::@constructor::new::@formalParameter::o1
3503-
#F8 default super.a @124
3503+
#F8 super.a @124
35043504
element: <testLibrary>::@class::B::@constructor::new::@formalParameter::a
3505-
#F9 default o2 @147
3505+
#F9 o2 @147
35063506
element: <testLibrary>::@class::B::@constructor::new::@formalParameter::o2
3507-
#F10 default super.b @170
3507+
#F10 super.b @170
35083508
element: <testLibrary>::@class::B::@constructor::new::@formalParameter::b
35093509
classes
35103510
class A
@@ -3572,7 +3572,7 @@ library
35723572
typeName: A
35733573
typeNameOffset: 12
35743574
formalParameters
3575-
#F3 default a @19
3575+
#F3 a @19
35763576
element: <testLibrary>::@class::A::@constructor::new::@formalParameter::a
35773577
initializer: expression_0
35783578
IntegerLiteral
@@ -3586,7 +3586,7 @@ library
35863586
typeName: B
35873587
typeNameOffset: 53
35883588
formalParameters
3589-
#F6 default super.a @71
3589+
#F6 super.a @71
35903590
element: <testLibrary>::@class::B::@constructor::new::@formalParameter::a
35913591
classes
35923592
class A
@@ -3980,7 +3980,7 @@ library
39803980
typeName: A
39813981
typeNameOffset: 12
39823982
formalParameters
3983-
#F3 default a @28
3983+
#F3 a @28
39843984
element: <testLibrary>::@class::A::@constructor::new::@formalParameter::a
39853985
#F4 class B @41
39863986
element: <testLibrary>::@class::B
@@ -16012,7 +16012,7 @@ library
1601216012
#F4 x @19
1601316013
element: <testLibrary>::@class::C::@setter::x
1601416014
formalParameters
16015-
#F5 default a @22
16015+
#F5 a @22
1601616016
element: <testLibrary>::@class::C::@setter::x::@formalParameter::a
1601716017
classes
1601816018
class C
@@ -16105,7 +16105,7 @@ library
1610516105
#F4 x @19
1610616106
element: <testLibrary>::@class::C::@setter::x
1610716107
formalParameters
16108-
#F5 default a @22
16108+
#F5 a @22
1610916109
element: <testLibrary>::@class::C::@setter::x::@formalParameter::a
1611016110
classes
1611116111
class C
@@ -18567,9 +18567,9 @@ library
1856718567
formalParameters
1856818568
#F5 a @36
1856918569
element: <testLibrary>::@class::A::@constructor::c2::@formalParameter::a
18570-
#F6 default b @45
18570+
#F6 b @45
1857118571
element: <testLibrary>::@class::A::@constructor::c2::@formalParameter::b
18572-
#F7 default c @52
18572+
#F7 c @52
1857318573
element: <testLibrary>::@class::A::@constructor::c2::@formalParameter::c
1857418574
initializer: expression_0
1857518575
IntegerLiteral
@@ -18583,9 +18583,9 @@ library
1858318583
formalParameters
1858418584
#F9 a @72
1858518585
element: <testLibrary>::@class::A::@constructor::c3::@formalParameter::a
18586-
#F10 default b @81
18586+
#F10 b @81
1858718587
element: <testLibrary>::@class::A::@constructor::c3::@formalParameter::b
18588-
#F11 default c @88
18588+
#F11 c @88
1858918589
element: <testLibrary>::@class::A::@constructor::c3::@formalParameter::c
1859018590
initializer: expression_1
1859118591
IntegerLiteral
@@ -18606,9 +18606,9 @@ library
1860618606
formalParameters
1860718607
#F16 a (offset=-1)
1860818608
element: <testLibrary>::@class::C::@constructor::c2::@formalParameter::a
18609-
#F17 default b (offset=-1)
18609+
#F17 b (offset=-1)
1861018610
element: <testLibrary>::@class::C::@constructor::c2::@formalParameter::b
18611-
#F18 default c (offset=-1)
18611+
#F18 c (offset=-1)
1861218612
element: <testLibrary>::@class::C::@constructor::c2::@formalParameter::c
1861318613
initializer: expression_0
1861418614
#F19 synthetic c3
@@ -18617,9 +18617,9 @@ library
1861718617
formalParameters
1861818618
#F20 a (offset=-1)
1861918619
element: <testLibrary>::@class::C::@constructor::c3::@formalParameter::a
18620-
#F21 default b (offset=-1)
18620+
#F21 b (offset=-1)
1862118621
element: <testLibrary>::@class::C::@constructor::c3::@formalParameter::b
18622-
#F22 default c (offset=-1)
18622+
#F22 c (offset=-1)
1862318623
element: <testLibrary>::@class::C::@constructor::c3::@formalParameter::c
1862418624
initializer: expression_1
1862518625
mixins
@@ -19870,7 +19870,7 @@ library
1987019870
element: <testLibrary>::@class::MixinApp::@constructor::positionalArg
1987119871
typeName: MixinApp
1987219872
formalParameters
19873-
#F9 default x (offset=-1)
19873+
#F9 x (offset=-1)
1987419874
element: <testLibrary>::@class::MixinApp::@constructor::positionalArg::@formalParameter::x
1987519875
initializer: expression_0
1987619876
BooleanLiteral
@@ -19880,7 +19880,7 @@ library
1988019880
element: <testLibrary>::@class::MixinApp::@constructor::positionalArg2
1988119881
typeName: MixinApp
1988219882
formalParameters
19883-
#F11 default x (offset=-1)
19883+
#F11 x (offset=-1)
1988419884
element: <testLibrary>::@class::MixinApp::@constructor::positionalArg2::@formalParameter::x
1988519885
initializer: expression_1
1988619886
BooleanLiteral
@@ -19890,7 +19890,7 @@ library
1989019890
element: <testLibrary>::@class::MixinApp::@constructor::namedArg
1989119891
typeName: MixinApp
1989219892
formalParameters
19893-
#F13 default x (offset=-1)
19893+
#F13 x (offset=-1)
1989419894
element: <testLibrary>::@class::MixinApp::@constructor::namedArg::@formalParameter::x
1989519895
initializer: expression_2
1989619896
IntegerLiteral
@@ -19900,7 +19900,7 @@ library
1990019900
element: <testLibrary>::@class::MixinApp::@constructor::namedArg2
1990119901
typeName: MixinApp
1990219902
formalParameters
19903-
#F15 default x (offset=-1)
19903+
#F15 x (offset=-1)
1990419904
element: <testLibrary>::@class::MixinApp::@constructor::namedArg2::@formalParameter::x
1990519905
initializer: expression_3
1990619906
BooleanLiteral

0 commit comments

Comments
 (0)