Skip to content
This repository was archived by the owner on Apr 8, 2025. It is now read-only.

Commit 5fc2c91

Browse files
authored
Fix the travis build by running dartfmt (#34)
* Various changes. * Update presubmit. * Dartfmt to fix travis build. * And bug fix.
1 parent f0d8541 commit 5fc2c91

File tree

3 files changed

+16
-9
lines changed

3 files changed

+16
-9
lines changed

CHANGELOG.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
1+
## 1.0.0-alpha+6
2+
3+
- `MethodBuilder.closure` emits properly as a top-level function
4+
15
## 1.0.0-alpha+5
26

3-
- MethodBuilder with no statements will create an empty block instead of a
4-
semicolon.
7+
- MethodBuilder with no statements will create an empty block instead of
8+
a semicolon.
59

610
```dart
711
// main() {}
812
method('main')
913
```
1014

11-
- Fix lambdas and closures to not include a trailing semicolon when used as an
12-
expression.
15+
- Fix lambdas and closures to not include a trailing semicolon when used
16+
as an expression.
1317

1418
```dart
1519
// () => false

lib/src/builders/method.dart

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,9 @@ class _LambdaMethodBuilder extends Object
376376
),
377377
);
378378
}
379+
380+
@override
381+
CompilationUnitMember buildTopLevelAst([Scope scope]) => buildFunction(scope);
379382
}
380383

381384
class _MethodBuilderImpl extends Object
@@ -412,10 +415,10 @@ class _MethodBuilderImpl extends Object
412415
null,
413416
_property != Keyword.GET ? buildParameterList(scope) : null,
414417
new BlockFunctionBody(
415-
null,
416-
null,
417-
buildBlock(scope),
418-
),
418+
null,
419+
null,
420+
buildBlock(scope),
421+
),
419422
);
420423
}
421424

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: code_builder
2-
version: 1.0.0-alpha+5
2+
version: 1.0.0-alpha+6
33
description: A fluent API for generating Dart code
44
author: Dart Team <[email protected]>
55
homepage: https://github.com/dart-lang/code_builder

0 commit comments

Comments
 (0)