Commit ef3a8c0e authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Fix minor bugs

parent fce994a1
......@@ -344,7 +344,7 @@ class Symbol(QObject, QGraphicsPathItem):
LOG.debug(str(traceback.format_exc()))
LOG.error('Checker failed - no parser for this construct?')
else:
if check_last_semi:
if check_last_semi and str(self).strip():
if str(self).strip()[-1] == ';':
syntax_errors.append("Remove the semi-colon at the end"
" of the text.")
......
......@@ -930,8 +930,8 @@ def check_type_compatibility(primary, type_ref, context):
Possibly returns a list of warnings; can raises TypeError
'''
warnings = [] # function returns a list of warnings
assert type_ref is not None
if type_ref is UNKNOWN_TYPE:
# assert type_ref is not None
if type_ref is UNKNOWN_TYPE or type_ref is None:
#print traceback.print_stack()
raise TypeError('Type reference is unknown')
......@@ -2205,6 +2205,8 @@ def primary_call(root, context):
errors.append(error(root, str(err)))
except OverflowError:
errors.append(error(root, 'Result can exceeds 64-bits'))
except Warning as warn:
warnings.append(warning(root, str(warn)))
return node, errors, warnings
......
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