Last active
October 28, 2016 18:59
-
-
Save natebosch/102529d424c29193fadbf07c33516259 to your computer and use it in GitHub Desktop.
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:math'; | |
final random = new Random(); | |
void main() { | |
var isString; | |
if (random.nextBool()) { | |
isString = 'It is a string'; | |
isString.notAMethod(); // Analyzer sees a String | |
} else { | |
isString = 'no really, always'; | |
isString.notAMethod(); | |
} | |
isString.notAMethod(); // Analyzer sees dynamic | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment