This repository was archived by the owner on Apr 8, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +16
-4
lines changed
Expand file tree Collapse file tree 5 files changed +16
-4
lines changed Original file line number Diff line number Diff line change 1+ ## 1.0.0-alpha+8
2+
3+ - Fix an import scoping bug in ` return ` statements and named constructor invocations.
4+
15## 1.0.0-alpha+7
26
37- Make use of new analyzer API in preparation for analyzer version 0.30.
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ class _AsReturn extends TopLevelMixin implements StatementBuilder {
1616 Statement buildStatement ([Scope scope]) {
1717 return astFactory.returnStatement (
1818 $return,
19- _value.buildExpression (),
19+ _value.buildExpression (scope ),
2020 $semicolon,
2121 );
2222 }
Original file line number Diff line number Diff line change @@ -492,7 +492,7 @@ class _NormalConstructorBuilder extends Object
492492 null ,
493493 null ,
494494 null ,
495- returnType.buildType ().name,
495+ returnType.buildType (scope ).name,
496496 _name != null ? $period : null ,
497497 _name != null ? stringIdentifier (_name) : null ,
498498 buildParameterList (scope),
Original file line number Diff line number Diff line change 11name : code_builder
2- version : 1.0.0-alpha+7
2+ version : 1.0.0-alpha+8
33description : A fluent API for generating Dart code
44author :
Dart Team <[email protected] > 55homepage : https://github.com/dart-lang/code_builder
Original file line number Diff line number Diff line change @@ -84,7 +84,11 @@ void main() {
8484 reference ('_module' ).invoke ('getDep1' , []),
8585 reference ('_module' ).invoke ('getDep2' , []),
8686 ]),
87- )..addAnnotation (lib$core.override)));
87+ )..addAnnotation (lib$core.override))
88+ ..addMethod (new MethodBuilder (
89+ 'instantiateAndReturnNamedThing' ,
90+ returnType: thingRef,
91+ )..addStatement (thingRef.namedNewInstance ('named' , []).asReturn ())));
8892 expect (
8993 lib,
9094 equalsSource (
@@ -99,6 +103,10 @@ void main() {
99103
100104 @override
101105 _i2.Thing getThing() => new _i2.Thing(_module.getDep1(), _module.getDep2());
106+
107+ _i2.Thing instantiateAndReturnNamedThing() {
108+ return new _i2.Thing.named();
109+ }
102110 }
103111 ''' ,
104112 pretty: true ,
You can’t perform that action at this time.
0 commit comments