Skip to content

Runtime Type Checking of Cyclic Assignment #1148

@DavePearce

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions