From be443f0bc607c7bb21c07747a27bc1218df56da9 Mon Sep 17 00:00:00 2001 From: Dag Sverre Seljebotn Date: Thu, 18 Sep 2008 11:43:41 +0200 Subject: [PATCH] Better error for casts (#48) --- Cython/Compiler/Parsing.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Cython/Compiler/Parsing.py b/Cython/Compiler/Parsing.py index 396c4d6e..415c29b9 100644 --- a/Cython/Compiler/Parsing.py +++ b/Cython/Compiler/Parsing.py @@ -229,6 +229,8 @@ def p_typecast(s): pos = s.position() s.next() base_type = p_c_base_type(s) + if base_type.name is None: + s.error("Unknown type") declarator = p_c_declarator(s, empty = 1) if s.sy == '?': s.next() -- 2.26.2