Last active
October 12, 2023 10:31
-
-
Save eernstg/ffa608c63f62ebb8f8fc1caf6b3569af to your computer and use it in GitHub Desktop.
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
class A<X extends A<X>> {} | |
class B extends A<B> {} | |
class C extends B {} | |
void f<X extends A<X>>(X x) {} | |
void main() { | |
f<B>(C()); // OK. | |
f(C()); // Compile-time error: "Couldn't infer ..". | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment