From 02d74485e41feadd2dd98edce3416eda57168772 Mon Sep 17 00:00:00 2001
From: Robert Griesemer
-func findMarker(c <-chan int) int {
- for i := range c {
- if x := <-c; isMarker(x) {
- return x
+func IndexRune(s string, r rune) int {
+ for i, c := range s {
+ if c == r {
+ return i
}
}
- // invalid: missing return statement.
+ // invalid: missing return statement
}
@@ -2598,9 +2598,10 @@ p.x // (*(*p).T0).x
q.x // (*(*q).T0).x (*q).x is a valid field selector
-p.M2() // p.M2() M2 expects *T2 receiver
+p.M0() // ((*p).T0).M0() M0 expects *T0 receiver
p.M1() // ((*p).T1).M1() M1 expects T1 receiver
-p.M0() // ((&(*p).T0)).M0() M0 expects *T0 receiver, see section on Calls
+p.M2() // p.M2() M2 expects *T2 receiver
+t.M2() // (&t).M2() M2 expects *T2 receiver, see section on Calls
-- 2.52.0