-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Regression for inline if
when condition is defined in trait
#16641
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
Comments
inline if
when condidition is defined in traitinline if
when condition is defined in trait
The longer reproducer is also good to have, but here's one that's absolutely minimal afaict: trait Logger:
inline def debug: False = false
type False = false
inline def log(): Unit =
inline if debug then ()
class Test:
def test(l: Logger) = l.log()
|
Dale noticed that the inliner is looking for a
it has the right type but not the expected tree shape. Perhaps the inliner shouldn't be so picky about the tree shape? Or would that open the barn door too wide? |
Dale found #10107 (because one of our experiments made it fail) which is relevant — note the exchange between Jamie and Nico about whether looking inside |
Based on Open CB failure for zio/izumi-reflect Open CB #37007
Bisect points to 342ebf3
Compiler version
3.3.0-RC1-bin-20230105-b65b0f2-NIGHTLY
Minimized code
Output
Expectation
Should compile
The text was updated successfully, but these errors were encountered: