Skip to content
  • Yorick Peterse's avatar
    Support circular types in the Ruby compiler · 81a8fd1e
    Yorick Peterse authored
    This adds very basic (and super hacky) support for circular types to the
    Ruby compiler, which should be _just_ enough to allow us to continue
    work on the self-hosting compiler. Circular types can arise as follows:
    
        object TypeParameter {
          @required_traits: Array!(TraitType)
        }
    
        object TraitType {
          @type_parameters: Array!(TypeParameter)
        }
    
    Without support for circular types code like this won't compile.
    
    The changes needed to make this work are a total hack, and in some cases
    will lead to some duplicate work being done (with the results being
    discarded). Since this code will only stick around briefly, this is fine
    for now.
    81a8fd1e