From 294c057ff9f9c4a28ced9773ce883b95b05d3622 Mon Sep 17 00:00:00 2001 From: Ruslan Mustakov Date: Tue, 1 Aug 2017 21:06:20 +0700 Subject: [PATCH] Suppress false warning --- godot/nim/godotmacros.nim | 2 ++ 1 file changed, 2 insertions(+) diff --git a/godot/nim/godotmacros.nim b/godot/nim/godotmacros.nim index 4e33bd6..fd7def7 100644 --- a/godot/nim/godotmacros.nim +++ b/godot/nim/godotmacros.nim @@ -355,12 +355,14 @@ template registerGodotField(classNameLit, classNameIdent, propNameLit, let getFunc = GodotPropertyGetFunc( getFunc: getFuncIdent ) + {.push warning[ProveInit]: off.} # false warning, Nim bug var attr = GodotPropertyAttributes( typ: ord(godotVariantType(propTypeIdent)), hintString: hintTipLit.toGodotString(), hint: GodotPropertyHint.hintIdent, usage: GodotPropertyUsageFlags.usageIdent ) + {.push warning[ProveInit]: on.} when hasDefaultValue: attr.defaultValue = (defaultValueNode).toGodot() godotScriptRegisterProperty(getNativeLibHandle(), classNameLit, propNameLit,