Skip to content
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

Incorrect variance checks when converting between function types #664

Open
HurryStarfish opened this issue May 26, 2024 · 0 comments
Open

Comments

@HurryStarfish
Copy link
Member

HurryStarfish commented May 26, 2024

Bug Report

It seems bcc has the co- and contravariance for return types and parameter types backwards when checking whether a function type is assignable from another.

Expected Behavior

Local f:String(s:Object)
Local f_:Object(o:String) = f

should compile without complaints.

Local f:Object(o:String)
Local f_:String(s:Object) = f

should be a type error.

Actual Behavior

It's the other way round

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant