Skip to content

Commit 5994cca

Browse files
committed
Address reviews
1 parent 66ea8b6 commit 5994cca

File tree

2 files changed

+4
-140
lines changed

2 files changed

+4
-140
lines changed

compiler/src/dotty/tools/dotc/ast/tpd.scala

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,14 @@ object tpd extends Trees.Instance[Type] with TypedTreeInfo {
4141
Super(qual, if (mixName.isEmpty) untpd.EmptyTypeIdent else untpd.Ident(mixName), inConstrCall, mixinClass)
4242

4343
def Apply(fn: Tree, args: List[Tree])(implicit ctx: Context): Apply = {
44-
assert(!fn.isInstanceOf[Block])
45-
assert(!fn.isInstanceOf[If])
44+
assert(fn.isInstanceOf[RefTree] || fn.isInstanceOf[GenericApply])
4645
ta.assignType(untpd.Apply(fn, args), fn, args)
4746
}
4847

49-
def TypeApply(fn: Tree, args: List[Tree])(implicit ctx: Context): TypeApply =
48+
def TypeApply(fn: Tree, args: List[Tree])(implicit ctx: Context): TypeApply = {
49+
assert(fn.isInstanceOf[RefTree] || fn.isInstanceOf[GenericApply])
5050
ta.assignType(untpd.TypeApply(fn, args), fn, args)
51+
}
5152

5253
def Literal(const: Constant)(implicit ctx: Context): Literal =
5354
ta.assignType(untpd.Literal(const))

compiler/src/dotty/tools/dotc/transform/Splitter.scala

Lines changed: 0 additions & 137 deletions
This file was deleted.

0 commit comments

Comments
 (0)