Sema: Support multiple -debug-forbid-typecheck-prefix arguments.

An existing test (Frontend/skip-function-bodies.swift) was designed under the
assumption that multiple `-debug-forbid-typecheck-prefix` arguments were
already supported, and as a result the test was not actually asserting what it
was written to assert.
This commit is contained in:
Allan Shortlidge
2023-09-25 11:39:42 -07:00
parent 1cd423dbf0
commit 50fdfbf7b4
6 changed files with 26 additions and 14 deletions

View File

@@ -63,3 +63,11 @@ class C {
var member = FORBID_ref
}
#endif
// Verify that multiple -debug-forbid-typecheck-prefix arguments may be specified.
// RUN: not --crash %target-swift-frontend -typecheck %s -D TRY9 -debug-forbid-typecheck-prefix FORBID_ -debug-forbid-typecheck-prefix FORBID2_ 2> %t.txt
// RUN: %FileCheck -check-prefix=CHECK9 -input-file %t.txt %s
#if TRY9
// CHECK9: note: forbidden typecheck occurred: FORBID2_global
var FORBID2_global = 0
#endif