Files
swift-mirror/validation-test/compiler_crashers_2_fixed/sr13461.swift
Robert Widmann 84c5065547 [SR-13461] Relax An Assert
This assert doesn't consider reference storage types in its predicate.
Look through them since they're not relevant to the type consistency
check it's trying to pick out.
2020-08-27 12:51:04 -07:00

18 lines
442 B
Swift

// RUN: %target-swift-frontend -disable-availability-checking -emit-ir -o /dev/null %s
// REQUIRES: asserts
final class Klass {
static var current: Klass {
fatalError()
}
}
private struct Build<T> {
let val: T
unowned let unownedBinding = Klass.current
unowned(unsafe) let unownedUnsafeBinding = Klass.current
weak var weakBinding = Klass.current
}
private func phase<T>(_ val: T) -> Build<T> {
return Build<T>(val: val)
}