From 53b6c91d183a9535118c6cb51e0f422c92e295cf Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Thu, 18 Jul 2019 16:02:06 +0200 Subject: [PATCH] allow building code with [live] without -live --- compiler/fn.v | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/compiler/fn.v b/compiler/fn.v index 8af227fa9e..49ec570da0 100644 --- a/compiler/fn.v +++ b/compiler/fn.v @@ -117,9 +117,9 @@ fn (p mut Parser) fn_decl() { p.fgen('fn ') defer { p.fgenln('\n') } is_pub := p.tok == .key_pub - is_live := p.attr == 'live' && !p.pref.is_so - if is_live && !p.pref.is_live { - p.error('run `v -live program.v` if you want to use [live] functions') + is_live := p.attr == 'live' && !p.pref.is_so && p.pref.is_live + if p.attr == 'live' && p.first_run() { + println('INFO: run `v -live program.v` if you want to use [live] functions') } if is_pub { p.next()