Skip to content

Instantly share code, notes, and snippets.

@exterm
Last active December 26, 2015 23:18
Show Gist options
  • Save exterm/7229007 to your computer and use it in GitHub Desktop.
Save exterm/7229007 to your computer and use it in GitHub Desktop.
Strange runtime type error in dart
/tmp$ dart --version
Dart VM version: 0.8.5.1_r28990 (Tue Oct 22 04:50:58 2013) on "linux_x64"
/tmp$ dartanalyzer test.dart
Analyzing test.dart...
No issues found
/tmp$ dart -c test.dart
Unhandled exception:
type 'int' is not a subtype of type 'double' of 'x'.
#0 Point.Point (dart:math/point.dart:13)
#1 main (file:///tmp/test.dart:4:25)
import 'dart:math';
void main() {
Point<double> p = new Point<double>();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment