-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unsoundness with covariant type #8718
Comments
Yep, this is a bug. We should not allow you to make |
Ah, of course, it should be contravariant, thanks! |
This might be another issue but even when I declare it as contravariant ( m(TestComponent, {}) but at least not m(TestComponent, { another: 2 }) |
Issue from your last message is likely due to Flow treating |
Flow version: 0.156.0 (at least since 0.135.0)
Expected behavior
Making type generic does not introduce unsoundness.
Actual behavior
https://flow.org/try/#0PTAEBUCcE9UhTAtgewG4EsB2BzUAiAaj1AAt4EAaUAQwBtbRzJlIBnUAE3VeoAdf41SACgsAF3IAzagGN4oAIIy5vMa3AAeAuAB8oAN7CAkLJViAFGIBcEAJQ3UydBwDcwgL7DhkgK6YZYujImKA+rPCsSmYsGrrmpvCqLDZRiWqaulSodD7wNuC2Bl6e3n4BQSFhEalJkADCtNSsrLE65jK0rDYNTS016a06WTl5dkUeXh29oADKYpBY2P0soOiIvLRI8Jhqispp6hqs84t6hib7qpY2xws49qCOzuNGniVVkZdiLOaY8ADusxOOGWkHMtioeGoeFswg+oN+AKBdyWXx+ENAACZCiBQGISNxQKwSMgfLQOKBpOhaF54Wj6o1muY5ijQZDobC6dEGb1mcDUdyqNjQLj8YTiaTyZTqNSvMIxNABKAAPIAIwAVvAAgAxFig0AAXiKRmytFyN35E2EU2ayMWas1AX1aw2Wx27H6hwdWrEusgoLOxgSV2sKo1Pr9oMKhmMb1p4U+3MRgJZ9vDTvp4Ko+lN5vw0PcnITCL+Kf53ozSYx+kLcOLmdLdpwFbECOrudGmMLIrAYvYErJFKpNK5aRYPSZqeb6db9OztdHtQnrD5KJbbIMHZsULwC-r3OXq7Tjtngs3IxsXZxvYJ-ZJg+l1KAA
Context
Our Mithril definitions use types which looks similar to these:
The text was updated successfully, but these errors were encountered: