-
Notifications
You must be signed in to change notification settings - Fork 264
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
isError for a non-existing type returns false #107
Comments
similarly, for the following input:
the type of |
#108 has a tentative fix to this. |
i'm not sure if this is fixed, I'm still seeing the same error with the This is my test input:
the type of |
actually i think this is happening because i internally call Should we change asMemberOf to bail out immediately if type is an error type? |
This CL fixes two issues: * isSameType in KSP was not working as Room expects for platform types. We still want it to consider nullability for kotlin types but for types coming from Java (or .class w/ nullability), we use flexible equality the same way kotlin does. We may eventually change how isSameType works as it is not always clear whether it expects exact equality with nullability or without nullability. * We were losing error types by eagerly calling `asMemberOf` which loses that information. google/ksp#107 To workaround it, we don't call asMemberOf if the type resolution returns an error type. I've also updated KspTypeTests to use the XProcessing classes to ensure they go through the same expected path (which revelaed the asMemberOf bug). They are still not running w/ KAPT because some things like wildcard handling changes. I'll do that in a followup. Bug: 160322705 Bug: 175246617 Test: XTypeTest, KspTypeTest Change-Id: Ibd241456e4f402e5bc2b9002511ff59b7fab08e2
fixed in #607 |
Given the following java source:
If I run:
this returns
false
instead oftrue
.KSP version:
1.4.0-dev-experimental-20200914
The text was updated successfully, but these errors were encountered: