Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a Dart 2 runtime cast failure. #677

Merged
merged 1 commit into from Mar 22, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
@@ -1,5 +1,5 @@
.dart_tool/
.idea
.pub
packages
.packages
build
4 changes: 4 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,7 @@
# 1.0.11-dev

* Fix cast failure when running in Dart 2.

# 1.0.10

* Don't split before `.` if the target expression is an argument list with a
Expand Down
3 changes: 2 additions & 1 deletion lib/src/line_splitting/solve_state.dart
Expand Up @@ -5,6 +5,7 @@
library dart_style.src.line_splitting.solve_state;

import '../debug.dart' as debug;
import '../nesting_level.dart';
import '../rule/rule.dart';
import '../whitespace.dart';
import 'line_splitter.dart';
Expand Down Expand Up @@ -280,7 +281,7 @@ class SolveState {
void _calculateSplits() {
// Figure out which expression nesting levels got split and need to be
// assigned columns.
var usedNestingLevels = new Set();
var usedNestingLevels = new Set<NestingLevel>();
for (var i = 0; i < _splitter.chunks.length - 1; i++) {
var chunk = _splitter.chunks[i];
if (chunk.rule.isSplit(getValue(chunk.rule), chunk)) {
Expand Down
18 changes: 9 additions & 9 deletions pubspec.lock
@@ -1,5 +1,5 @@
# Generated by pub
# See http://pub.dartlang.org/doc/glossary.html#lockfile
# See https://www.dartlang.org/tools/pub/glossary#lockfile
packages:
analyzer:
dependency: "direct main"
Expand All @@ -14,14 +14,14 @@ packages:
name: args
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0"
version: "1.4.1"
async:
dependency: "direct dev"
description:
name: async
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.4"
version: "2.0.6"
barback:
dependency: transitive
description:
Expand All @@ -35,14 +35,14 @@ packages:
name: boolean_selector
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.2"
version: "1.0.3"
browser:
dependency: "direct dev"
description:
name: browser
url: "https://pub.dartlang.org"
source: hosted
version: "0.10.0+2"
version: "0.10.0+3"
charcode:
dependency: transitive
description:
Expand All @@ -63,7 +63,7 @@ packages:
name: collection
url: "https://pub.dartlang.org"
source: hosted
version: "1.14.5"
version: "1.14.9"
convert:
dependency: transitive
description:
Expand Down Expand Up @@ -112,7 +112,7 @@ packages:
name: html
url: "https://pub.dartlang.org"
source: hosted
version: "0.13.2+2"
version: "0.13.3"
http:
dependency: transitive
description:
Expand Down Expand Up @@ -308,7 +308,7 @@ packages:
name: stream_channel
url: "https://pub.dartlang.org"
source: hosted
version: "1.6.3"
version: "1.6.4"
string_scanner:
dependency: transitive
description:
Expand All @@ -329,7 +329,7 @@ packages:
name: test
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.30+3"
version: "0.12.32+2"
test_descriptor:
dependency: "direct dev"
description:
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
@@ -1,6 +1,6 @@
name: dart_style
# Note: See tool/grind.dart for how to bump the version.
version: 1.0.10
version: 1.0.11-dev
author: Dart Team <misc@dartlang.org>
description: Opinionated, automatic Dart source code formatter.
homepage: https://github.com/dart-lang/dart_style
Expand Down