Fix #418 (wrong error message)
authorDag Sverre Seljebotn <dagss@student.matnat.uio.no>
Fri, 16 Oct 2009 11:14:22 +0000 (13:14 +0200)
committerDag Sverre Seljebotn <dagss@student.matnat.uio.no>
Fri, 16 Oct 2009 11:14:22 +0000 (13:14 +0200)
Cython/Compiler/Symtab.py
tests/errors/notcimportedT418.pyx [new file with mode: 0644]

index e661eff1c456de20222a47d567d9becb0a61d466..892e985d8a3a3a39c96f88240a6b7773f4012505 100644 (file)
@@ -499,7 +499,7 @@ class Scope(object):
             if entry.as_module:
                 scope = entry.as_module
             else:
-                error(pos, "'%s' is not a cimported module" % scope.qualified_name)
+                error(pos, "'%s' is not a cimported module" % '.'.join(path))
                 return None
         return scope
         
diff --git a/tests/errors/notcimportedT418.pyx b/tests/errors/notcimportedT418.pyx
new file mode 100644 (file)
index 0000000..c2dbd0e
--- /dev/null
@@ -0,0 +1,7 @@
+import somemod.child
+
+cdef somemod.child.something x
+
+_ERRORS = u"""
+3:5: 'somemod.child' is not a cimported module
+"""