Created
June 22, 2018 18:15
-
-
Save zolotyh/5ae88dfdcc442cf65e405333180bb35c to your computer and use it in GitHub Desktop.
cast problem
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:async'; | |
import 'dart:collection'; | |
void main(){ | |
final completer = new Completer<dynamic>(); | |
final future = completer.future; | |
future.then((dynamic result){ | |
print('before error'); | |
LinkedHashSet set = (result as LinkedHashSet).cast<String>(); | |
print('after error'); | |
}); | |
new Timer(const Duration(milliseconds: 400), (){ | |
completer.complete(new LinkedHashSet<String>()); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment