Skip to content

Commit e1fe25c

Browse files
author
Marc Rasi
committed
clarify comment
1 parent e896211 commit e1fe25c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

test/SILOptimizer/pound_assert.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -97,24 +97,24 @@ func test_topLevelEvaluation(topLevelArgument: Int) {
9797

9898
func test_trapsAndOverflows() {
9999
// The error message below is generated by the traditional constant folder.
100-
// The constant folder responsible for #assert does not generate an overflow
100+
// The interpreter responsible for #assert does not generate an overflow
101101
// error because the traditional constant folder replaces the condition with
102-
// a constant before the #assert constant folder sees it.
102+
// a constant before the #assert interpreter sees it.
103103
// expected-error @+1 {{arithmetic operation '124 + 92' (on type 'Int8') results in an overflow}}
104104
#assert((124 as Int8) + 92 < 42)
105105

106106
// One error message below is generated by the traditional constant folder.
107-
// The constant folder responsible for #assert does generate an additional
108-
// error message.
107+
// The interpreter responsible for #assert does generate an additional error
108+
// message.
109109
// expected-error @+2 {{integer literal '123231' overflows when stored into 'Int8'}}
110110
// expected-error @+1 {{#assert condition not constant}}
111111
#assert(Int8(123231) > 42)
112112
// expected-note @-1 {{integer overflow detected}}
113113

114114
// The error message below is generated by the traditional constant folder.
115-
// The constant folder responsible for #assert does not generate an overflow
115+
// The interpreter responsible for #assert does not generate an overflow
116116
// error because the traditional constant folder replaces the condition with
117-
// a constant before the #assert constant folder sees it.
117+
// a constant before the #assert interpreter sees it.
118118
// expected-error @+2 {{arithmetic operation '124 + 8' (on type 'Int8') results in an overflow}}
119119
// expected-error @+1 {{assertion failed}}
120120
#assert(Int8(124) + 8 > 42)

0 commit comments

Comments
 (0)