Last active
February 15, 2021 15:10
-
-
Save Animeshz/b3df98f58631f6d587bd94fdb95fdd90 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
class A {} | |
class B extends A {} | |
class C extends A {} | |
void main() { | |
List<A> animals = [B()]; | |
List<C> cats = []; | |
print("reached here"); | |
try { | |
cats.add(animals.first); | |
} catch (e) { | |
print('"runtime" error occured in addition, not compile time'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment