gracelang / minigrace

Self-hosting compiler for the Grace programming language
39 stars 22 forks source link

Compiler exception when compiling code with "outer.outer" #283

Closed IsaacOscar closed 5 years ago

IsaacOscar commented 5 years ago

The following correct, albeit usesless, code:

object {object {outer.outer}}

Raises the following excpetion when run through mgc:


NoSuchMethod: no method addLast(_) on sequence [object object_on_line_2] (defined in module basic library, line 0).  Did you mean at(_) or do(_)?
  raised at transformCall(_) at line 1451 of identifierresolution
  requested from block.apply(_,_) at line 744 of identifierresolution
  requested from memberNode.new(_,_).map(_)ancestors(_) at line 1961 of ast
  requested from block.apply(_) at line 131 of ast
  requested from block.apply at line 681 of collectionsPrelude
  requested from while(_)do(_) in native code
  requested from list.do(_) at line 677 of collectionsPrelude
  requested from listMap(_,_)ancestors(_) at line 131 of ast
  requested from objectNode.new(_,_).map(_)ancestors(_) at line 1750 of ast
  requested from block.apply(_) at line 131 of ast
  requested from block.apply at line 681 of collectionsPrelude
  requested from while(_)do(_) in native code
  requested from list.do(_) at line 677 of collectionsPrelude
  requested from listMap(_,_)ancestors(_) at line 131 of ast
  requested from moduleNode.body(_).map(_)ancestors(_) at line 1594 of ast
  requested from resolveIdentifiers(_) at line 754 of identifierresolution
  requested from resolve(_) at line 1495 of identifierresolution
  requested from block.apply at line 83 of compiler
  requested from module initialization at line 19 of /usr/bin/compiler.js
  requested on line 19 of.                                                                                                                                                                                  ```
apblack commented 5 years ago

This bug is fixed in commit d64ed064607389907a8e041ad461ba15b39b686d