dart-lang/dartlang.org — pull request #47 by financeCoding (2013-03-21 01:42:07+00:00)
Title: Optional types article code

I had to uncomment two lines that would fail the static type checker. Its a valid example but since we have the static type checker on `--enable_type_checks --fatal-type-errors --extended-exit-code --type-checks-for-inferred-types` the test would fail. Maybe we should override or have a custom flags for each article?

```
18:31:55-adam@Adams-MacBook-Air:~/dart/dartlang.org/src/site/articles/optional-types/code
$ dart_analyzer --enable_type_checks --fatal-type-errors --extended-exit-code --type-checks-for-inferred-types optional_types_code_test.dart
file:/Users/adam/dart/dartlang.org/src/site/articles/optional-types/code/optional_types_code_test.dart:17:11: 'Point' is not assignable to 'int'
16:
17: int n = p1 + p2;
file:/Users/adam/dart/dartlang.org/src/site/articles/optional-types/code/optional_types_code_test.dart:67:5: 'double' is not assignable to 'int'
66:
67: bar(3.2); // returns 6.4 in production, but fails in checked mode
Compilation failed with 2 problems.
```