Fix an issue when running in Dart 2. (#685)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3de6cec..78aac6c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,7 @@
+# 1.0.12
+
+* Fix another failure when running in Dart 2.
+
 # 1.0.11
 
 * Fix cast failure when running in Dart 2.
diff --git a/bin/format.dart b/bin/format.dart
index 0e8ec50..316d72f 100644
--- a/bin/format.dart
+++ b/bin/format.dart
@@ -14,7 +14,7 @@
 import 'package:dart_style/src/source_code.dart';
 
 // Note: The following line of code is modified by tool/grind.dart.
-const version = "1.0.11";
+const version = "1.0.12";
 
 void main(List<String> args) {
   var parser = new ArgParser(allowTrailingOptions: true);
diff --git a/lib/src/source_visitor.dart b/lib/src/source_visitor.dart
index 6aa818e..277ad00 100644
--- a/lib/src/source_visitor.dart
+++ b/lib/src/source_visitor.dart
@@ -589,7 +589,7 @@
     visit(node.scriptTag);
 
     // Put a blank line between the library tag and the other directives.
-    var directives = node.directives;
+    Iterable<Directive> directives = node.directives;
     if (directives.isNotEmpty && directives.first is LibraryDirective) {
       visit(directives.first);
       twoNewlines();
diff --git a/pubspec.yaml b/pubspec.yaml
index 5f908cd..60894b7 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -1,6 +1,6 @@
 name: dart_style
 # Note: See tool/grind.dart for how to bump the version.
-version: 1.0.11
+version: 1.0.12
 author: Dart Team <misc@dartlang.org>
 description: Opinionated, automatic Dart source code formatter.
 homepage: https://github.com/dart-lang/dart_style