ruby: added error message to isinstance check
Added error message when a symbol is not an instance of a particular expected type.
This commit is contained in:
@@ -72,7 +72,10 @@ class SymbolTable(object):
|
||||
continue
|
||||
|
||||
if types is not None:
|
||||
assert isinstance(symbol, types)
|
||||
if not isinstance(symbol, types):
|
||||
symbol.error("Symbol '%s' is not of types '%s'.",
|
||||
symbol,
|
||||
types)
|
||||
|
||||
return symbol
|
||||
|
||||
|
||||
Reference in New Issue
Block a user