Skip to content

transparent inline def does not enforce type parameter bounds #12325

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

Closed
bplommer opened this issue May 4, 2021 · 1 comment
Closed

transparent inline def does not enforce type parameter bounds #12325

bplommer opened this issue May 4, 2021 · 1 comment

Comments

@bplommer
Copy link
Contributor

bplommer commented May 4, 2021

Compiler version

3.0.0-RC3

Minimized code

transparent inline def foo[A <: Int]: Int = valueOf[A]
@main def run = println(foo["hi"])

Output

hi

Expectation

This should fail to compile with a type error, as it does when foo in not transparent

@nicolasstucki
Copy link
Contributor

This is a duplicate of #10552

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

No branches or pull requests

2 participants