diff --git a/Sources/FrontEnd/TypedProgram.swift b/Sources/FrontEnd/TypedProgram.swift index 28b0b023d..3e643d45d 100644 --- a/Sources/FrontEnd/TypedProgram.swift +++ b/Sources/FrontEnd/TypedProgram.swift @@ -129,7 +129,7 @@ public struct TypedProgram { } /// The type checking of a collection of source files. - private final class TypeCheckTask: Operation { + private final class TypeCheckTask: Operation, @unchecked Sendable { /// The sources to check. private let sources: [TranslationUnit.ID] diff --git a/StandardLibrary/Sources/Array.hylo b/StandardLibrary/Sources/Array.hylo index 4c1d61e88..dd8db8007 100644 --- a/StandardLibrary/Sources/Array.hylo +++ b/StandardLibrary/Sources/Array.hylo @@ -1,5 +1,5 @@ /// An ordered, random-access collection. -public type Array: SemiRegular { +public type Array: Movable, Deinitializable { /// The out-of-line storage of the array. /// @@ -207,7 +207,7 @@ public type Array: SemiRegular { } -public conformance Array: Equatable { +public conformance Array: Equatable where Element: Equatable { /// Returns `true` iff `other` has an equivalent value. public fun infix== (_ other: Self) -> Bool { diff --git a/StandardLibrary/Sources/Core/Range.hylo b/StandardLibrary/Sources/Core/Range.hylo index cb3059b0e..04e8b4566 100644 --- a/StandardLibrary/Sources/Core/Range.hylo +++ b/StandardLibrary/Sources/Core/Range.hylo @@ -1,5 +1,5 @@ /// A half-open interval from a lower bound up to, but not including, an uppor bound. -public type Range { +public type Range { // TODO: private(set) /// The minimum value included in `self`. diff --git a/StandardLibrary/Sources/Core/Regular.hylo b/StandardLibrary/Sources/Core/Regular.hylo index e3a1ac171..3cfed1a8b 100644 --- a/StandardLibrary/Sources/Core/Regular.hylo +++ b/StandardLibrary/Sources/Core/Regular.hylo @@ -3,9 +3,9 @@ /// /// - Move is value-preserving. /// - Destruction has no side-effects. -public trait SemiRegular: Deinitializable, Movable, Equatable {} +public trait SemiRegular: Copyable, Deinitializable {} /// Regular types (roughly per Stepanov). /// /// Copies have equal value. -public trait Regular: SemiRegular, Copyable {} +public trait Regular: SemiRegular, Equatable {} diff --git a/Tests/HyloTests/TestCases/TypeChecking/AbstractType.hylo b/Tests/HyloTests/TestCases/TypeChecking/AbstractType.hylo index d36223a41..dc2351bfa 100644 --- a/Tests/HyloTests/TestCases/TypeChecking/AbstractType.hylo +++ b/Tests/HyloTests/TestCases/TypeChecking/AbstractType.hylo @@ -1,14 +1,19 @@ //- typeCheck expecting: .success -trait P: SemiRegular { - type T: SemiRegular - type U: SemiRegular +// Our SemiRegular when this test was written wasn't the genuine +// SemiRegular but was being depended on by this test, so rephrasing +// it here. +trait LegacySemiRegular: Deinitializable, Movable, Equatable {} + +trait P: LegacySemiRegular { + type T: LegacySemiRegular + type U: LegacySemiRegular fun t(_ x: T) fun u(_ x: U) } -trait Q: SemiRegular { +trait Q: LegacySemiRegular { type V: P property v: V { let } }