Author: David Schneider <[email protected]>
Branch: disable_merge_different_int_types
Changeset: r49691:96f0a1fe89b1
Date: 2011-11-23 16:10 +0100
http://bitbucket.org/pypy/pypy/changeset/96f0a1fe89b1/
Log: raise UnionError
diff --git a/pypy/annotation/binaryop.py b/pypy/annotation/binaryop.py
--- a/pypy/annotation/binaryop.py
+++ b/pypy/annotation/binaryop.py
@@ -263,18 +263,18 @@
knowntype = t1
elif t2 is int:
if not int2.is_constant():
- raise Exception, "Merging %s and a non-constant int is not
allowed" % t1
+ raise UnionError, "Merging %s and a non-constant int is not
allowed" % t1
knowntype = t1
# ensure constant int2 is in range of t1
t1(int2.const)
elif t1 is int:
if not int1.is_constant():
- raise Exception, "Merging %s and a non-constant int is not
allowed" % t2
+ raise UnionError, "Merging %s and a non-constant int is not
allowed" % t2
knowntype = t2
# ensure constant int1 is in range of t2
t2(int1.const)
else:
- raise Exception, "Merging these types (%s, %s) is not supported" %
(t1, t2)
+ raise UnionError, "Merging these types (%s, %s) is not supported"
% (t1, t2)
return SomeInteger(nonneg=int1.nonneg and int2.nonneg,
knowntype=knowntype)
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit