Bug 450255: Invalid 'cannot generate a constructor' case

This commit is contained in:
Gustavo J. A. M. Carneiro committed 2009-10-21 18:30:48 +01:00
1 parent 4d03d58b41
commit 8bec9ac902
4 files changed
+27 -7

No files matched your search

+4 -4
View File
@@ -553,12 +553,12 @@ class CppConstructor(ForwardWrapperBase):
Returns the wrapper function name.
"""
if self.visibility == 'private':
raise CodeGenerationError("Class %r has a private constructor ->"
" cannot generate a constructor for it" % self._class.full_name)
raise utils.SkipWrapper("Class %r has a private constructor ->"
" cannot generate a constructor for it" % self._class.full_name)
elif self.visibility == 'protected':
if self._class.helper_class is None:
raise CodeGenerationError("Class %r has a protected constructor and no helper class"
" -> cannot generate a constructor for it" % self._class.full_name)
raise utils.SkipWrapper("Class %r has a protected constructor and no helper class"
" -> cannot generate a constructor for it" % self._class.full_name)
#assert isinstance(class_, CppClass)
tmp_sink = codesink.MemoryCodeSink()