Commit c5b12aac authored by Robert Bradshaw's avatar Robert Bradshaw

New message(...) distinct from warn(...)

parent a704e200
......@@ -139,6 +139,17 @@ def error(position, message):
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
......@@ -181,7 +181,7 @@ class SimpleAssignmentTypeInferer:
# 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():
......@@ -202,7 +202,7 @@ class SimpleAssignmentTypeInferer:
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:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment