Skip to content

Commit fe92034

Browse files
committed
style(check): fix shell-escape artifacts in comments
A past edit through a shell pipeline left '\'' sequences in place of apostrophes across several comment blocks. Restore the plain apostrophes. Comments only - the legitimate '\'' rune literals in the converter and error-message code are untouched.
1 parent 9d986d8 commit fe92034

3 files changed

Lines changed: 14 additions & 14 deletions

File tree

rts/check/narrow.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -709,7 +709,7 @@ func narrowByTypeOf(base rl.TypingT, target string) (truthy, falsy rl.TypingT) {
709709
// Drop Never contributions; preserve actual types.
710710
// nil from a recursive call means "this arm has no
711711
// static handle for either side." Pass the arm through
712-
// unchanged so the union join doesn'\''t lose it.
712+
// unchanged so the union join doesn't lose it.
713713
if tA == nil {
714714
truthyArms = append(truthyArms, arm)
715715
} else if !isNeverType(tA) {
@@ -735,7 +735,7 @@ func narrowByTypeOf(base rl.TypingT, target string) (truthy, falsy rl.TypingT) {
735735
// left is null.
736736
return inner, rl.NewNullType()
737737
}
738-
// Inner doesn'\''t match target and null doesn'\''t match any
738+
// Inner doesn't match target and null doesn't match any
739739
// non-null target. Truthy is empty; falsy is the original.
740740
return rl.NewNeverType(), base
741741
}

rts/check/narrow_interp_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,8 @@ func TestNarrowByTypeOf_OptionalNullTarget(t *testing.T) {
187187

188188
func TestNarrowByTypeOf_UnionWithOptionalPreservesNullArm(t *testing.T) {
189189
// int?|str narrowed by type_of=="int".
190-
// Truthy: int (the optional'\''s inner matched).
191-
// Falsy: int? (the optional'\''s null half stays) and str (untouched).
190+
// Truthy: int (the optional's inner matched).
191+
// Falsy: int? (the optional's null half stays) and str (untouched).
192192
// This is the Phase 4h regression test for "union+optional drops null."
193193
base := rl.NewUnionType(
194194
rl.NewOptionalType(rl.NewIntType()),
@@ -200,14 +200,14 @@ func TestNarrowByTypeOf_UnionWithOptionalPreservesNullArm(t *testing.T) {
200200
require.NotNil(t, falsy)
201201
// Falsy should contain int? (null arm preserved) and str. Exact
202202
// representation depends on the join; what matters is the null
203-
// component isn'\''t silently dropped.
203+
// component isn't silently dropped.
204204
name := falsy.Name()
205205
assert.Contains(t, name, "?",
206206
"falsy must retain the nullable arm; got %q", name)
207207
}
208208

209209
func TestNarrowByTypeOf_AnyShortCircuits(t *testing.T) {
210-
// any can'\''t be partitioned without losing information.
210+
// any can't be partitioned without losing information.
211211
truthy, falsy := narrowByTypeOf(rl.NewAnyType(), "int")
212212
assert.Nil(t, truthy)
213213
assert.Nil(t, falsy)
@@ -268,7 +268,7 @@ func TestInterpretCondition_TypeOfSwappedOperands(t *testing.T) {
268268
}
269269

270270
func TestInterpretCondition_TypeOfInvalidTargetMakesTruthyUnreachable(t *testing.T) {
271-
// type_of(x) == "frobnicate" - "frobnicate" isn'\''t a valid type_of
271+
// type_of(x) == "frobnicate" - "frobnicate" isn't a valid type_of
272272
// return, so the equality is statically false. Truthy is Never.
273273
tc, ident, sym := makeChecker(rl.NewIntType())
274274
cond := rl.NewOpBinary(rl.Span{}, rl.OpEq,
@@ -344,7 +344,7 @@ func TestInterpretCondition_StrEnumNeqLiteralInverts(t *testing.T) {
344344
}
345345

346346
func TestInterpretCondition_StrEnumPlainStrNoNarrowing(t *testing.T) {
347-
// Plain str shouldn'\''t narrow to a singleton enum - that surprises
347+
// Plain str shouldn't narrow to a singleton enum - that surprises
348348
// users who declared the var as str.
349349
tc, ident, sym := makeChecker(rl.NewStrType())
350350
cond := rl.NewOpBinary(rl.Span{}, rl.OpEq, ident, rl.NewLitStringSimple(rl.Span{}, "x"))

rts/check/type_check_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -841,7 +841,7 @@ y = x
841841
require.NotNil(t, ySym)
842842
got := info.SymbolTypes[ySym]
843843
require.NotNil(t, got)
844-
// Union dedupes by Name; order isn'\''t guaranteed because the
844+
// Union dedupes by Name; order isn't guaranteed because the
845845
// joined symbol map iterates Go maps. Accept either ordering.
846846
name := got.Name()
847847
assert.Contains(t, []string{"int|str", "str|int"}, name,
@@ -966,7 +966,7 @@ func TestUnionJoin_AllNeverGivesNever(t *testing.T) {
966966
}
967967

968968
func TestUnionJoin_AnyDoesNotSwallowConcrete(t *testing.T) {
969-
// `int | any` keeps both arms - gradual any shouldn'\''t silently
969+
// `int | any` keeps both arms - gradual any shouldn't silently
970970
// erase the concrete int.
971971
got := check.UnionJoinForTest([]rl.TypingT{
972972
rl.NewIntType(),
@@ -1068,7 +1068,7 @@ func TestTypeCheck_ReassignmentWidens(t *testing.T) {
10681068

10691069
func TestTypeCheck_WhileSorbetDropsBodyAssignedNarrowing(t *testing.T) {
10701070
// The body reassigns x; the post-loop frame must not assume x is
1071-
// the WhenFalse-narrowed type for x'\''s base. We just verify the
1071+
// the WhenFalse-narrowed type for x's base. We just verify the
10721072
// reassigned var has its widened type post-loop.
10731073
src := `fn f(x: int|str):
10741074
while type_of(x) == "int":
@@ -1156,7 +1156,7 @@ func TestTypeCheck_ForLoopVarFromStringIsStr(t *testing.T) {
11561156
}
11571157

11581158
func TestTypeCheck_ForLoopVarDynamicForUnknownIter(t *testing.T) {
1159-
// A function call we can'\''t resolve yields Dynamic.
1159+
// A function call we can't resolve yields Dynamic.
11601160
src := `for v in unknown_fn():
11611161
print(v)
11621162
`
@@ -1274,7 +1274,7 @@ func TestTypeCheck_IfDoesNotLeakNarrowingAfter(t *testing.T) {
12741274
// After a non-exiting if, the narrowing should not persist into
12751275
// subsequent statements at the same scope. Use a fn param so the
12761276
// base type stays int? - a top-level `x: int? = 5` would narrow
1277-
// x to int on assignment, and the if'\''s null-predicate would have
1277+
// x to int on assignment, and the if's null-predicate would have
12781278
// nothing to strip.
12791279
src := `fn f(x: int?):
12801280
if x != null:
@@ -1290,7 +1290,7 @@ func TestTypeCheck_IfDoesNotLeakNarrowingAfter(t *testing.T) {
12901290
// Branches contribute int (truthy exit) and int? (acc = base).
12911291
// The dedupe-by-Name union keeps them as int|int?; semantically
12921292
// equivalent to int? (since int <: int?), but a tighter
1293-
// representation would need union-arm subsumption that we don'\''t
1293+
// representation would need union-arm subsumption that we don't
12941294
// have today.
12951295
name := gotXUse.Name()
12961296
assert.Contains(t, []string{"int?", "int|int?", "int?|int"}, name,

0 commit comments

Comments
 (0)