File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed
compiler/src/dotty/tools/dotc/transform Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -140,7 +140,15 @@ object TypeTestsCasts {
140
140
}
141
141
142
142
def interceptTypeApply (tree : TypeApply )(implicit ctx : Context ): Tree = trace(s " transforming ${tree.show}" , show = true ) {
143
- tree.fun match {
143
+ interceptTypeApply1(tree, tree.fun match {
144
+ case i : Ident =>
145
+ desugarIdent(i).withPos(tree.fun)
146
+ case t => t
147
+ })
148
+ }
149
+
150
+ private def interceptTypeApply1 (tree : TypeApply , treeFun : Tree )(implicit ctx : Context ): Tree = {
151
+ treeFun match {
144
152
case fun @ Select (expr, selector) =>
145
153
val sym = tree.symbol
146
154
Original file line number Diff line number Diff line change
1
+ object i0 {
2
+ // Adding anything in front of asInstanceOf,
3
+ // i0 or this, makes the error go away.
4
+ def i1 : Int = asInstanceOf [Int ].toInt
5
+
6
+ val i2 = asInstanceOf [Int ]
7
+ }
You can’t perform that action at this time.
0 commit comments