Diagnose @safe @unsafe when used together

Fixes rdar://147943857.
This commit is contained in:
Doug Gregor
2025-03-27 16:28:44 -07:00
parent d86f41a922
commit 8789871035
3 changed files with 16 additions and 2 deletions

View File

@@ -268,3 +268,6 @@ struct UnsafeWrapTest {
}
}
}
@safe @unsafe
struct ConfusedStruct { } // expected-error{{struct 'ConfusedStruct' cannot be both @safe and @unsafe}}