summaryrefslogtreecommitdiffstatshomepage
path: root/py/emitpass1.c
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2014-01-11 16:33:32 +0200
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2014-01-12 00:20:49 +0200
commitb81e1fdef742675b1e285df80c39159f0bdbf90b (patch)
treef8e4253aa3f22c56d174130c5a1d5db0bc85448c /py/emitpass1.c
parenteae16445d5f6ca4bcd693422fc93ccf4fd7e215e (diff)
downloadmicropython-b81e1fdef742675b1e285df80c39159f0bdbf90b.tar.gz
micropython-b81e1fdef742675b1e285df80c39159f0bdbf90b.zip
Add AssertionError.
Diffstat (limited to 'py/emitpass1.c')
-rw-r--r--py/emitpass1.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/py/emitpass1.c b/py/emitpass1.c
index 2f0ecac86d..60fdd0b825 100644
--- a/py/emitpass1.c
+++ b/py/emitpass1.c
@@ -45,10 +45,7 @@ static void emit_pass1_load_id(emit_t *emit, qstr qstr) {
bool added;
id_info_t *id = scope_find_or_add_id(emit->scope, qstr, &added);
if (added) {
- if (qstr == MP_QSTR_AssertionError) {
- // TODO how much of a hack is this?
- id->kind = ID_INFO_KIND_GLOBAL_EXPLICIT;
- } else if (strcmp(qstr_str(qstr), "super") == 0 && emit->scope->kind == SCOPE_FUNCTION) {
+ if (strcmp(qstr_str(qstr), "super") == 0 && emit->scope->kind == SCOPE_FUNCTION) {
// special case, super is a global, and also counts as use of __class__
id->kind = ID_INFO_KIND_GLOBAL_EXPLICIT;
id_info_t *id2 = scope_find_local_in_parent(emit->scope, emit->qstr___class__);