mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
We are building the class layout based on this type which expects archetypes. rdar://61751511
21 lines
645 B
Swift
21 lines
645 B
Swift
// RUN: %empty-directory(%t)
|
|
// RUN: %target-swift-frontend -enable-library-evolution -emit-module-path=%t/ResilientBase.swiftmodule -module-name=ResilientBase %S/Inputs/ResilientBase.swift
|
|
// RUN: %target-swift-frontend -primary-file %s -emit-ir -I %t -profile-generate -profile-coverage-mapping
|
|
|
|
// This test use to crash because we emitted a FieldAccess::NonConstantDirect for _t.
|
|
|
|
import ResilientBase
|
|
|
|
class TheTest {
|
|
func test_resilientSubclassCrasher() {
|
|
final class SubclassOfResilientBase<T> : ResilientBase {
|
|
@Wrapper var t: T
|
|
|
|
init(_ t: T) {
|
|
self.t = t
|
|
}
|
|
}
|
|
_ = SubclassOfResilientBase(0)
|
|
}
|
|
}
|