Skip to content

Commit

Permalink
[WASM] Disable KeyPath crash test for WASM
Browse files Browse the repository at this point in the history
  • Loading branch information
kateinoigakukun committed Feb 26, 2020
1 parent 59cc02c commit b425d02
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/stdlib/KeyPath.swift
Original file line number Diff line number Diff line change
Expand Up @@ -422,13 +422,15 @@ keyPath.test("optional force-unwrapping") {
expectTrue(value.questionableCanary === newCanary)
}

#if !os(WASI)
keyPath.test("optional force-unwrapping trap") {
let origin_x = \TestOptional.origin!.x
var value = TestOptional(origin: nil)

expectCrashLater()
_ = value[keyPath: origin_x]
}
#endif

struct TestOptional2 {
var optional: TestOptional?
Expand Down

0 comments on commit b425d02

Please sign in to comment.