Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,13 @@ object DummyUnifier extends TypeUnifier {
override def requireEqual(x: symbols.UnificationVar, tpe: symbols.ValueType, ctx: ErrorContext): Unit = ()
override def requireSubregion(lower: symbols.Captures, upper: symbols.Captures, ctx: ErrorContext): Unit = ()


// NOTE(jiribenes, 2025-11-12): I think the 'abort' should never be triggered here.
override def abort(msg: String, ctx: ErrorContext): Nothing = sys error "Unexpected abort in DummyUnifier!"
override def abort(msg: String, ctx: ErrorContext): Nothing = throw UnificationFailed

override def error(msg: String, ctx: ErrorContext): Unit = throw UnificationFailed
override def error(left: symbols.Type, right: symbols.Type, ctx: ErrorContext): Unit = throw UnificationFailed
}

class BindSome(binder: source.Tree, capabilities: Map[symbols.InterfaceType, symbols.BlockParam],val parent: CapabilityScope) extends CapabilityScope {
class BindSome(binder: source.Tree, capabilities: Map[symbols.InterfaceType, symbols.BlockParam], val parent: CapabilityScope) extends CapabilityScope {
def copy: CapabilityScope = BindSome(binder, capabilities, parent.copy)
def capabilityFor(tpe: symbols.InterfaceType)(using C: Context): symbols.BlockParam =
capabilities.get(tpe).orElse {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ trait TypeUnifier {
// TODO here we assume that the type constructor is covariant
(args1 zip args2) foreach { case (t1, t2) => unifyValueTypes(t1, t2, ErrorContext.TypeConstructorArgument(ctx)) }

case (t @ BoxedType(tpe1, capt1), s @ BoxedType(tpe2, capt2), p, _) =>
case (t @ BoxedType(tpe1, capt1), s @ BoxedType(tpe2, capt2), _, _) =>
unifyBlockTypes(tpe1, tpe2, ErrorContext.BoxedTypeBlock(t, s, ctx))
unifyCaptures(capt1, capt2, ErrorContext.BoxedTypeCapture(t, s, ctx))

Expand Down
Loading