LEVEL=1 # warn about all errors level 1 or higher
+def message(position, message, level=1):
+ if level < LEVEL:
+ return
+ warn = CompileWarning(position, message)
+ line = "note: %s\n" % warn
+ if listing_file:
+ listing_file.write(line)
+ if echo_file:
+ echo_file.write(line)
+ return warn
+
def warning(position, message, level=0):
if level < LEVEL:
return
-from Errors import error, warning, warn_once, InternalError
+from Errors import error, warning, message, warn_once, InternalError
import ExprNodes
import Nodes
import Builtin
# print "No assignments", entry.pos, entry
entry.type = py_object_type
if verbose:
- warning(entry.pos, "inferred '%s' to be of type '%s'" % (entry.name, entry.type), 1)
+ message(entry.pos, "inferred '%s' to be of type '%s'" % (entry.name, entry.type))
resolve_dependancy(entry)
# Deal with simple circular dependancies...
for entry, deps in dependancies_by_entry.items():
for entry in dependancies_by_entry:
entry.type = py_object_type
if verbose:
- warning(entry.pos, "inferred '%s' to be of type '%s' (default)" % (entry.name, entry.type), 1)
+ message(entry.pos, "inferred '%s' to be of type '%s' (default)" % (entry.name, entry.type))
def find_spanning_type(type1, type2):
if type1 is type2: