Skip to content

Runtime Type Checking of Cyclic Assignment #1148

Description

@DavePearce

(see also #1145)

000497 fails because it attempts to check (at runtime) the invariant of a cyclic type:

type Cyclic is { null|&Cyclic ptr, int data }

public export method test():
    &Cyclic p = new {ptr:null, data: 0}
    &Cyclic q = new {ptr:p, data: 0}
    // Make it cyclic!
    p->ptr = q
    //
    assert p != q
    assert p->data == q->data

This is certainly problematic!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions