Files
swift-mirror/test/SILGen/ambiguous_pointer_conversion.swift
Slava Pestov 34e7e824e9 Sema: Fix non-determinism with ConstraintSystem::ConstraintRestrictions
We iterate over the DenseMap and simplify both types appearing
in the key. If multiple keys simplify to the same type, later
keys overwrite earlier keys, so the outcome depends on hash
table order.

Fix this by introducing an arbitrary tie break: we prefer the
highest-numbered restriction.

Fixes rdar://146780049.
2025-03-17 14:35:10 -04:00

2.0 KiB