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
Unexpected desugaring to selectDynamic #6551
Comments
Imported From: https://issues.scala-lang.org/browse/SI-6551?orig=1 |
@retronym said (edited on Oct 21, 2012 10:26:05 AM UTC): |
@xeno-by said: |
@retronym said (edited on Oct 21, 2012 11:29:58 AM UTC): The first would be addressed by this refinement to case (8) of * (8) When in both EXPRmode and FUNmode, add apply method calls to values of object type.
The second part, which is what triggered the regression, is in: object dyna {
import treeInfo.{isApplyDynamicName, DynamicUpdate, DynamicApplicationNamed}
def acceptsApplyDynamic(tp: Type) = tp.typeSymbol isNonBottomSubClass DynamicClass
}
...
def applyPossible = {
def applyMeth = member(adaptToName(tree, nme.apply), nme.apply)
dyna.acceptsApplyDynamic(tree.tpe) || (
if ((mode & TAPPmode) != 0)
tree.tpe.typeParams.isEmpty && applyMeth.filter(!_.tpe.typeParams.isEmpty) != NoSymbol
else
applyMeth.filter(_.tpe.paramSectionCount > 0) != NoSymbol
)
}
|
@namin said (edited on Oct 21, 2012 2:29:39 PM UTC): def applyMeth = member(adaptToName(tree, nme.apply), nme.apply)
- dyna.acceptsApplyDynamic(tree.tpe) || (
+ (dyna.acceptsApplyDynamic(tree.tpe) && !tree.tpe.isInstanceOf[PolyType]) || ( namin/scala@namin:2.10.0-wip...namin:si-6551 What do you think, Jason? Also, should I send a pull request against 2.10.0-wip or 2.10.x? Thanks. |
@retronym said: Submit it with a dose of optimism to |
@namin said: |
@retronym said: |
@adriaanm said: |
@retronym said (edited on Oct 22, 2012 3:18:20 PM UTC): |
@paulp said: |
@retronym said: |
The text was updated successfully, but these errors were encountered: