some work to make 'opt' a first class type

This commit is contained in:
Andreas Rumpf 2017-09-24 11:21:52 +02:00
commit e879da5791
13 changed files with 52 additions and 71 deletions

View file

@ -1234,7 +1234,7 @@ proc semInferredLambda(c: PContext, pt: TIdTable, n: PNode): PNode =
s.typ = n.typ
for i in 1..<params.len:
if params[i].typ.kind in {tyTypeDesc, tyGenericParam,
tyFromExpr, tyFieldAccessor}+tyTypeClasses:
tyFromExpr}+tyTypeClasses:
localError(params[i].info, "cannot infer type of parameter: " &
params[i].sym.name.s)
#params[i].sym.owner = s