forked from M-Labs/artiq
1
0
Fork 0

Unbreak tests.

This commit is contained in:
whitequark 2015-08-11 00:41:31 +03:00
parent 200330a808
commit 786fde827a
5 changed files with 5 additions and 5 deletions

View File

@ -186,7 +186,7 @@ class ARTIQIRGenerator(algorithm.Visitor):
optargs.append(ir.Argument(ir.TOption(typ.optargs[arg_name]), "arg." + arg_name))
func = ir.Function(typ, ".".join(self.name), [env_arg] + args + optargs,
loc=node.keyword_loc)
loc=node.lambda_loc if is_lambda else node.keyword_loc)
func.is_internal = is_internal
self.functions.append(func)
old_func, self.current_function = self.current_function, func

View File

@ -728,7 +728,7 @@ class Inferencer(algorithm.Visitor):
elif keyword.arg in typ.optargs:
self._unify(keyword.value.type, typ.optargs[keyword.arg],
keyword.value.loc, None)
passed_args.add(keyword.arg)
passed_args[keyword.arg] = keyword.arg_loc
for formalname in typ.args:
if formalname not in passed_args:

View File

@ -403,7 +403,7 @@ class LLVMIRGenerator:
finally:
self.llfunction = None
self.llmap = {}
self.llphis = []
self.phis = []
def process_Phi(self, insn):
llinsn = self.llbuilder.phi(self.llty_of_type(insn.type), name=insn.name)

View File

@ -11,5 +11,5 @@ len(1)
# CHECK-L: ${LINE:+1}: error: the argument of list() must be of an iterable type
list(1)
# CHECK-L: ${LINE:+1}: error: an argument of range() must be of a numeric type
# CHECK-L: ${LINE:+1}: error: an argument of range() must be of an integer type
range([])

View File

@ -13,7 +13,7 @@ f(*[])
# CHECK-L: ${LINE:+1}: error: variadic arguments are not supported
f(**[])
# CHECK-L: ${LINE:+1}: error: the argument 'x' is already passed
# CHECK-L: ${LINE:+1}: error: the argument 'x' has been passed earlier as positional
f(1, x=1)
# CHECK-L: ${LINE:+1}: error: mandatory argument 'x' is not passed