diff options
author | John R. Lenton <jlenton@gmail.com> | 2014-01-13 00:41:12 +0000 |
---|---|---|
committer | John R. Lenton <jlenton@gmail.com> | 2014-01-13 00:41:12 +0000 |
commit | 13e64f06604c1502317921201bdde33c57161808 (patch) | |
tree | 865c85e4aaa41fc86711010362b7c0b0b4dbf832 /py/emitpass1.c | |
parent | 813edf63a3e4c0bab3dd5edd4e7295462386c2f3 (diff) | |
parent | 34f813ee29c7191e3de455c3fc9c788496e3b29e (diff) | |
download | micropython-13e64f06604c1502317921201bdde33c57161808.tar.gz micropython-13e64f06604c1502317921201bdde33c57161808.zip |
Merge remote-tracking branch 'upstream/master' into containment
Diffstat (limited to 'py/emitpass1.c')
-rw-r--r-- | py/emitpass1.c | 5 |
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__); |