Last active
July 14, 2020 18:18
-
-
Save Grohden/24de5b79c41575d9c4ac81781d0b79bb to your computer and use it in GitHub Desktop.
example of ignored side effects by tree shaking unused nodes in dart
This file contains hidden or 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
String b() { | |
print("Hey, I'm a side effect, I'm gonna mess with your program!"); | |
return ""; | |
} | |
final a = b(); | |
void main() { | |
// a; // Uncomment for a nice side effect! | |
print("Hello!"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment