We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8292bb3 + 9d73937 commit 1629f61Copy full SHA for 1629f61
src/compiler/scala/tools/nsc/typechecker/TreeCheckers.scala
@@ -262,7 +262,14 @@ abstract class TreeCheckers extends Analyzer {
262
checkedTyped(tree, mode, pt)
263
)
264
private def checkedTyped(tree: Tree, mode: Mode, pt: Type): Tree = {
265
- val typed = wrap(tree)(super.typed(tree, mode, pt))
+ val typed = wrap(tree)(super.typed(tree.clearType(), mode, pt))
266
+
267
+ // Vlad: super.typed returns null for package defs, why is that?
268
+ if (typed eq null)
269
+ return tree
270
271
+ if (typed.tpe ne null)
272
+ assert(!typed.tpe.isErroneous, "Tree has erroneous type: " + typed)
273
274
if (tree ne typed)
275
treesDiffer(tree, typed)
0 commit comments