|
1 | | -// Minimal reproducer — Swift 6.3.3 Windows (+Asserts) debug-info-mangler ICE |
2 | | -// on a plain nested-namespace protocol existential. |
3 | | -// |
4 | | -// Classification: ICE (assertion) during IRGen debug-info type mangling. |
5 | | -// Environment: Windows (windows-msvc), Swift 6.3.3 (+Asserts), -Onone -g. |
6 | | -// macOS toolchains are non-asserts; the assertion cannot fire there. |
7 | | -// Command: swiftc -Onone -g -c noncanonical-existential-debuginfo.swift -o repro.o |
8 | | -// Observed: Assertion failed: isActuallyCanonicalOrNull() && |
9 | | -// "Forming a CanType out of a non-canonical type!", AST/Type.h:421 |
10 | | -// while mangling debugger type 'any PDF.HTML.Style.Modifier'. |
11 | | -// Expected: Clean compile. |
12 | | -// |
13 | | -// Shape mirrored from swift-pdf-html-render's PDF.HTML.Context.apply(inlineStyle:) |
14 | | -// (PDF.HTML.Context+Rendering.swift:267/:283): SE-0404 protocols nested in a |
15 | | -// three-level enum namespace, an `Any` value unwrapped via Mirror, then explicit |
16 | | -// `as? any …Modifier` downcasts whose local bindings receive debug info. The |
17 | | -// protocols are PLAIN — no ~Copyable, no recursion, no associated types. |
18 | | -// |
19 | | -// TRACKING: swift-institute/Issues — swift-issue-noncanonical-existential-windows-debuginfo-ice |
20 | | - |
21 | 1 | public enum PDF { |
22 | 2 | public enum HTML { |
23 | 3 | public enum Style { |
@@ -58,7 +38,7 @@ extension PDF.HTML { |
58 | 38 | public init() {} |
59 | 39 |
|
60 | 40 | public mutating func apply(inlineStyle property: Any) -> Bool { |
61 | | - // Unwrap Optional if needed (mirrors the production dataflow). |
| 41 | + |
62 | 42 | let unwrapped: Any |
63 | 43 | let mirror = Mirror(reflecting: property) |
64 | 44 | if mirror.displayStyle == .optional { |
|
0 commit comments