Commit 3476834e authored by Stefan Behnel's avatar Stefan Behnel

print correct column in error message

parent babc378e
...@@ -1906,9 +1906,9 @@ class DefNode(FuncDefNode): ...@@ -1906,9 +1906,9 @@ class DefNode(FuncDefNode):
else: else:
arg.accept_none = True # won't be used, but must be there arg.accept_none = True # won't be used, but must be there
if arg.not_none: if arg.not_none:
error(self.pos, "Only Python type arguments can have 'not None'") error(arg.pos, "Only Python type arguments can have 'not None'")
if arg.or_none: if arg.or_none:
error(self.pos, "Only Python type arguments can have 'or None'") error(arg.pos, "Only Python type arguments can have 'or None'")
def analyse_signature(self, env): def analyse_signature(self, env):
if self.entry.is_special: if self.entry.is_special:
......
def eggs(int x not None, char* y not None): def eggs(int x not None, char* y not None):
pass pass
_ERRORS = u""" _ERRORS = u"""
1:0: Only Python type arguments can have 'not None' 1: 9: Only Python type arguments can have 'not None'
1:0: Only Python type arguments can have 'not None' 1:25: Only Python type arguments can have 'not None'
""" """
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