Skip to content

Conversation

@ringabout
Copy link
Member

@ringabout ringabout commented Oct 13, 2025

fixes #25048

proc canFormAcycleAux =
  of tyObject:
    # Inheritance can introduce cyclic types, however this is not relevant
    # as the type that is passed to 'new' is statically known!
    # er but we use it also for the write barrier ...
    if tfFinal notin t.flags:
      # damn inheritance may introduce cycles:
      result = true

It seems that all objects without tfFinal in their flags are registering cycles. It doesn't seem that Env can be a cyclic type because of inheritance since it is not going to be inherited after all by another Env object type

@Araq Araq merged commit f191ba8 into devel Oct 15, 2025
28 of 29 checks passed
@Araq Araq deleted the pr_ewjuk branch October 15, 2025 05:24
@github-actions
Copy link
Contributor

Thanks for your hard work on this PR!
The lines below are statistics of the Nim compiler built from f191ba8

Hint: mm: orc; opt: speed; options: -d:release
183148 lines; 8.437s; 661.699MiB peakmem

narimiran pushed a commit that referenced this pull request Oct 15, 2025
fixes  #25048

```nim
proc canFormAcycleAux =
  of tyObject:
    # Inheritance can introduce cyclic types, however this is not relevant
    # as the type that is passed to 'new' is statically known!
    # er but we use it also for the write barrier ...
    if tfFinal notin t.flags:
      # damn inheritance may introduce cycles:
      result = true
```

It seems that all objects without `tfFinal` in their flags are
registering cycles. It doesn't seem that `Env` can be a cyclic type
because of inheritance since it is not going to be inherited after all
by another `Env` object type

(cherry picked from commit f191ba8)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Closure environement wrongly marked as cyclic (orc)

3 participants