@@ -41,8 +41,11 @@ object tpd extends Trees.Instance[Type] with TypedTreeInfo {
41
41
def Super (qual : Tree , mixName : TypeName , inConstrCall : Boolean , mixinClass : Symbol = NoSymbol )(implicit ctx : Context ): Super =
42
42
Super (qual, if (mixName.isEmpty) untpd.EmptyTypeIdent else untpd.Ident (mixName), inConstrCall, mixinClass)
43
43
44
- def Apply (fn : Tree , args : List [Tree ])(implicit ctx : Context ): Apply =
44
+ def Apply (fn : Tree , args : List [Tree ])(implicit ctx : Context ): Apply = {
45
+ assert(! fn.isInstanceOf [Block ])
46
+ assert(! fn.isInstanceOf [If ])
45
47
ta.assignType(untpd.Apply (fn, args), fn, args)
48
+ }
46
49
47
50
def TypeApply (fn : Tree , args : List [Tree ])(implicit ctx : Context ): TypeApply =
48
51
ta.assignType(untpd.TypeApply (fn, args), fn, args)
@@ -182,8 +185,10 @@ object tpd extends Trees.Instance[Type] with TypedTreeInfo {
182
185
def Alternative (trees : List [Tree ])(implicit ctx : Context ): Alternative =
183
186
ta.assignType(untpd.Alternative (trees), trees)
184
187
185
- def UnApply (fun : Tree , implicits : List [Tree ], patterns : List [Tree ], proto : Type )(implicit ctx : Context ): UnApply =
188
+ def UnApply (fun : Tree , implicits : List [Tree ], patterns : List [Tree ], proto : Type )(implicit ctx : Context ): UnApply = {
189
+ assert(! fun.isInstanceOf [Block ])
186
190
ta.assignType(untpd.UnApply (fun, implicits, patterns), proto)
191
+ }
187
192
188
193
def ValDef (sym : TermSymbol , rhs : LazyTree = EmptyTree )(implicit ctx : Context ): ValDef =
189
194
ta.assignType(untpd.ValDef (sym.name, TypeTree (sym.info), rhs), sym)
0 commit comments