You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I encountered a circularity detection error when adding a multi candidate to &infix:<+>. It was very likely a false positive as this candidate was precisely added to fix a message from the compiler about the lack of a candidate.
Expected Behavior
No circularity detection.
Actual Behavior
Circularity detected.
Steps to Reproduce
Here is my attempt at a minimal code to reproduce the error :
class {
classFoo { has$.x; }
multimethodnew(Real$r) { ::?CLASS }
multiinfix:<+>(::?CLASS $a, ::?CLASS $b) { ::?CLASS }
multiinfix:<+>(Real$r, ::?CLASS $y) { samewith ::?CLASS.new($r), $y }
# When removing the constraint below, no circularity is detected.multiinfix:<+>(Real$r, Foo $ywhere$y.x==1) { samewith $r, ::?CLASS }
say1+ Foo.new;
}
Notice that the issue does not occur if instead of adding candidates to &infix:<+>, I create a brand new sub, say &foo.
Environment
Operating system: fedora-37
Compiler version: v2022.12-1-gd52342eb0
The text was updated successfully, but these errors were encountered:
The Problem
I encountered a circularity detection error when adding a multi candidate to
&infix:<+>
. It was very likely a false positive as this candidate was precisely added to fix a message from the compiler about the lack of a candidate.Expected Behavior
No circularity detection.
Actual Behavior
Circularity detected.
Steps to Reproduce
Here is my attempt at a minimal code to reproduce the error :
Notice that the issue does not occur if instead of adding candidates to
&infix:<+>
, I create a brand new sub, say&foo
.Environment
The text was updated successfully, but these errors were encountered: