From 3fe8b4f69d3bf651e3b3dc0895e6767ce475007c Mon Sep 17 00:00:00 2001 From: Araq Date: Thu, 15 Nov 2018 16:18:28 +0100 Subject: fixes #9692 --- compiler/semasgn.nim | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/compiler/semasgn.nim b/compiler/semasgn.nim index 62e01ba7b..3947e4f6c 100644 --- a/compiler/semasgn.nim +++ b/compiler/semasgn.nim @@ -81,8 +81,8 @@ proc genAddr(c: PContext; x: PNode): PNode = addSon(result, x) proc newAsgnCall(c: PContext; op: PSym; x, y: PNode): PNode = - if sfError in op.flags: - localError(c.config, x.info, "usage of '$1' is a user-defined error" % op.name.s) + #if sfError in op.flags: + # localError(c.config, x.info, "usage of '$1' is a user-defined error" % op.name.s) result = newNodeI(nkCall, x.info) result.add newSymNode(op) result.add genAddr(c, x) @@ -121,7 +121,10 @@ proc considerAsgnOrSink(c: var TLiftCtx; t: PType; body, x, y: PNode; op = field if op == nil: op = liftBody(c.c, t, c.kind, c.info) - markUsed(c.c.config, c.info, op, c.c.graph.usageSym) + if sfError in op.flags: + incl c.fn.flags, sfError + else: + markUsed(c.c.config, c.info, op, c.c.graph.usageSym) onUse(c.info, op) body.add newAsgnCall(c.c, op, x, y) result = true -- cgit 1.4.1-2-gfad0 a> blame commit diff stats
path: root/lib/ui/ui.go
blob: f04d3d8aa56502580189d78d489812d9e9c09cd6 (plain) (tree)
1
2
3
4
5
6
7
8
9
10