Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
with
2 additions
and
4 deletions.
-
+2
−4
topaz/objects/classobject.py
|
@@ -98,13 +98,11 @@ def method_undefined(self, space, w_name): |
|
|
def singleton_method_allocate(self, space, w_superclass=None): |
|
|
if w_superclass is not None: |
|
|
if not isinstance(w_superclass, W_ClassObject): |
|
|
raise space.error( |
|
|
space.w_TypeError, |
|
|
raise space.error(space.w_TypeError, |
|
|
"superclass must be a Class (%s given)" % space.obj_to_s(space.getclass(w_superclass)) |
|
|
) |
|
|
if w_superclass.is_singleton: |
|
|
raise space.error( |
|
|
space.w_TypeError, |
|
|
raise space.error(space.w_TypeError, |
|
|
"can't make subclass of singleton class" |
|
|
) |
|
|
else: |
|
|
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session.
You signed out in another tab or window. Reload to refresh your session.