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