Skip to content

Commit

Permalink
Add explanation for Array not conforming to Regular.
Browse files Browse the repository at this point in the history
  • Loading branch information
camio committed Sep 12, 2023
1 parent 81fabb3 commit 040ab75
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion Library/Hylo/Array.hylo
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/// An ordered, random-access collection.
public type Array<Element: Movable> : Regular {
public type Array<Element: Movable> : Deinitializable {

// TODO: Change from `Int` header to `Void` once #1000 is fixed
var _storage: DynamicBuffer<Int, Element>
Expand Down Expand Up @@ -64,6 +64,13 @@ public type Array<Element: Movable> : Regular {
}
}

/*

// TODO: Make Array conform to Regular instead of Deinitializable once #1002 is fixed.
// Currently that issue prevents the copy() function below from compiling.
//
// Error is "type 'Element' does not conform to trait 'Movable'"

public conformance Array: Equatable {

/// Returns `true` iff `other` has an equivalent value.
Expand All @@ -81,3 +88,5 @@ public conformance Array: Copyable {
.new()
}
}

*/

0 comments on commit 040ab75

Please sign in to comment.