Skip to content

Instantly share code, notes, and snippets.

@zolotyh zolotyh/example.dart
Created Jun 13, 2018

What would you like to do?
import 'dart:html';
void main() {
// far far away in code
final cat = new Cat();
// in this function
final list = [cat];
// type error
final newList = filter(list)
..add(new Animal())
..add(new BlackCat());
List<Animal> filter(List<Animal> input){ return input; }
class Animal {}
class Cat implements Animal {}
class BlackCat implements Cat {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.