File tree Expand file tree Collapse file tree 4 files changed +14
-5
lines changed
compiler/src/dotty/tools/dotc Expand file tree Collapse file tree 4 files changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -63,8 +63,12 @@ object Trees {
63
63
64
64
private def nxId = {
65
65
nextId += 1
66
+ if ((nextId == 94 ) && (nextId < 170 )) {
67
+ println(" dssds" )
68
+ }
66
69
// assert(nextId != 199, this)
67
70
nextId
71
+
68
72
}
69
73
70
74
/** A unique identifier for this tree. Used for debugging, and potentially
@@ -74,6 +78,7 @@ object Trees {
74
78
75
79
def uniqueId = myUniqueId
76
80
81
+
77
82
/** The type constructor at the root of the tree */
78
83
type ThisTree [T >: Untyped ] <: Tree [T ]
79
84
Original file line number Diff line number Diff line change @@ -479,8 +479,9 @@ object tpd extends Trees.Instance[Type] with TypedTreeInfo {
479
479
480
480
override def Select (tree : Tree )(qualifier : Tree , name : Name )(implicit ctx : Context ): Select = {
481
481
val tree1 = untpd.cpy.Select (tree)(qualifier, name)
482
+ lazy val oldMember = tree.asInstanceOf [Select ].qualifier.tpe.member(name)
482
483
tree match {
483
- case tree : Select if qualifier.tpe eq tree.qualifier.tpe =>
484
+ case tree : Select if ( qualifier.tpe eq tree.qualifier.tpe) && (oldMember.isOverloaded || oldMember.signature == qualifier.tpe.member(name).signature) =>
484
485
tree1.withTypeUnchecked(tree.tpe)
485
486
case _ => tree.tpe match {
486
487
case tpe : NamedType => tree1.withType(tpe.derivedSelect(qualifier.tpe.widenIfUnstable))
Original file line number Diff line number Diff line change @@ -29,10 +29,11 @@ object Formatting {
29
29
30
30
protected def showArg (arg : Any )(implicit ctx : Context ): String = arg match {
31
31
case arg : Showable =>
32
- try arg.show
33
- catch {
34
- case NonFatal (ex) => s " [cannot display due to $ex, raw string = $toString] "
35
- }
32
+ // try
33
+ arg.show
34
+ // catch {
35
+ // case NonFatal(ex) => s"[cannot display due to $ex, raw string = $toString]"
36
+ // }
36
37
case _ => arg.toString
37
38
}
38
39
Original file line number Diff line number Diff line change @@ -211,6 +211,8 @@ trait TypeAssigner {
211
211
/** The type of a selection with `name` of a tree with type `site`.
212
212
*/
213
213
def selectionType (site : Type , name : Name , pos : Position )(implicit ctx : Context ): Type = {
214
+ if (name.toString == " specializedFor" )
215
+ println(" bugaga" )
214
216
val mbr = site.member(name)
215
217
if (reallyExists(mbr)) site.select(name, mbr)
216
218
else if (site.derivesFrom(defn.DynamicClass ) && ! Dynamic .isDynamicMethod(name)) {
You can’t perform that action at this time.
0 commit comments