bugfix: scoping issue with Pair.make
authorBrendan Hansen <brendan.f.hansen@gmail.com>
Fri, 7 Apr 2023 16:54:50 +0000 (11:54 -0500)
committerBrendan Hansen <brendan.f.hansen@gmail.com>
Fri, 7 Apr 2023 16:54:50 +0000 (11:54 -0500)
core/container/pair.onyx

index 13f56c96d17f6d3645a5410e357b0bef76dea5f9..dce8bc890b53df943bc199c54aa4e8ff5d9664fd 100644 (file)
@@ -17,7 +17,7 @@ Pair :: struct (First_Type: type_expr, Second_Type: type_expr) {
 }
 
 #inject Pair {
-    make :: macro (x: $X, y: $Y) => Pair(X, Y).{x, y};
+    make :: macro (x: $X, y: $Y) => #this_package.Pair(X, Y).{x, y};
 
     _format :: (output: &conv.Format_Output, format: &conv.Format, p: &Pair($First_Type, $Second_Type)) {
         conv.format(output, "({}, {})", p.first, p.second);
@@ -43,4 +43,4 @@ hash.hash :: (p: Pair($First_Type/hash.Hashable, $Second_Type/hash.Hashable)) =>
 
 #local Equatable :: interface (t: $T) {
     { t == t } -> bool;
-}
\ No newline at end of file
+}