You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
class Example {
type VV
}
val e1 = new Example {
type VV <: Int
}
implicitly[e1.VV =:= String]
The error message is (I have set keepmodules to 2 for better demonstraction):
[Error] /....../Spec.scala:61: implicit error;
!I e (Cannot prove that e1.VV =:= String.): e1.VV scala.=:= java.lang.String
So what exactly is e1? It is clearly not global, so if there are many variables e1 scattered around the code. How to find it? An option similar to keepmodules should theoretically solve this problem, by partially displaying preceding package/module/path of a path-dependent type. Or if necessary, display the line of code of which such variable is created.
I haven't played with the scala reflection library for path-dependent type, so I don't know if it is physically possible. If you think this could be helpful, I'll definitely spend more time on it to figure it out
The text was updated successfully, but these errors were encountered:
I would expect that if that's feasible, it should be possible at the point where you would implement your feature from the other issue, where you should have access to the value's class. Since you're considering this, I would definitely call it helpful!
"by partially displaying preceding package/module/path of a path-dependent type" - this should be fixed, most test ground truths now contains the enclosing package/module/path:
"Or if necessary, display the line of code of which such variable is created" - this is totally possible, but should be enabled by a plugin setting, I'm thinking of "Vtype-def-position"
* add Vtype-def-position option, guarded by a test suite
* add filterConfigurations to dependencyUpdates, as suggested in this thread: ben-manes/gradle-versions-plugin#816
upgrade a gradle plugin
Here is a simple example:
The error message is (I have set keepmodules to 2 for better demonstraction):
So what exactly is
e1
? It is clearly not global, so if there are many variables e1 scattered around the code. How to find it? An option similar to keepmodules should theoretically solve this problem, by partially displaying preceding package/module/path of a path-dependent type. Or if necessary, display the line of code of which such variable is created.I haven't played with the scala reflection library for path-dependent type, so I don't know if it is physically possible. If you think this could be helpful, I'll definitely spend more time on it to figure it out
The text was updated successfully, but these errors were encountered: