Files
swift-mirror/test/Casting/fast_class_casts.swift
Erik Eckstein a768037d0b IRGen: fix failing unconditional class casts
When unconditionally casting from a base to a final derived class, e.g. `base as! Derived`, the program did not abort with a trap.
Instead the resulting null-pointer caused a crash later in the program.
This fix inserts a trap condition for the failing case of such a cast.

rdar://151462303
2025-05-19 16:56:47 +02:00

6.3 KiB