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
classC/*#1*/{
implicitdefconversion(m: Int)(implicitnada: Nothing):String=???classC/*#2*/ { // rename class to get correct error.
locally(0:String) // "value conversion is not a member of C.this.C"
}
}
The offending code:
// Typer#adaptcase _ =>
debuglog("fallback on implicits: "+ tree +"/"+ resetAllAttrs(original))
valtree1= typed(resetAllAttrs(original), mode, WildcardType)
// Q: `typed` already calls `pluginsTyped` and `adapt`. the only difference here is that// we pass `EmptyTree` as the `original`. intended? added in 2009 (53d98e7d42) by martin.
tree1.tpe = pluginsTyped(tree1.tpe, this, tree1, mode, pt)
if (tree1.isEmpty) tree1 else adapt(tree1, mode, pt, EmptyTree)
The winning implicit conversion is inferred as a symful Select(This(C#1), "conversion"). The resetAllAttrs brutalizes this tree, and upon retypechecking we end up with This(C#2).
resetLocalAttrs seems like a better option here.
The same problem arises with the two classes share the name "$anon".
traitT; traitUnewT {
implicitdefconversion(m: Int)(implicitnada: Nothing):String=???newU { // rename class to get correct error.
locally(0:String) // "value conversion is not a member of U"
}
}
The text was updated successfully, but these errors were encountered:
@harrah said:
The commit (32b5d50d6635320f448c92c27bc6df3acbb04451) in Jason's pull request, included in 2.11.0-M4, fixes sbt issue sbt/sbt#914 (unless I screwed up bisect). A partest test covering the sbt issue is here: harrah/scala@6da26cb. Useful to submit as a pull request? Can the fix be backported to 2.10.x?
@retronym said (edited on Oct 19, 2013 9:21:09 PM UTC):
Thanks for the precise bisection!
Please submit the test case. I suppose that fix has lived in master for a while without anything blowing up, so we might accept the backport, too, given that it helps SBT usability. That said, almost no-one has tried master in anger as we're only just in a position to start building Scalaz, Specs et al.
The offending code:
The winning implicit conversion is inferred as a symful
Select(This(C#1), "conversion")
. TheresetAllAttrs
brutalizes this tree, and upon retypechecking we end up withThis(C#2)
.resetLocalAttrs
seems like a better option here.The same problem arises with the two classes share the name "$anon".
The text was updated successfully, but these errors were encountered: