mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-19 14:36:39 +00:00
Expose indexing as a language interface (#4370)
This PR makes it so that types can implement the `IndexWith` interface so that they can provide their custom indexing behavior. --------- Co-authored-by: Jon Ross-Perkins <jperkins@google.com>
This commit is contained in:
1 parent
c30b1d1124
commit
89eed4220f
464 files changed
+2506
-29
No files matched your search
@@ -44,6 +44,7 @@ fn G() -> i32 {
|
||||
// CHECK:STDOUT: import Core//prelude/types
|
||||
// CHECK:STDOUT: import Core//prelude/operators/arithmetic
|
||||
// CHECK:STDOUT: import Core//prelude/operators/as
|
||||
// CHECK:STDOUT: import Core//prelude/operators/index
|
||||
// CHECK:STDOUT: import Core//prelude/operators/bitwise
|
||||
// CHECK:STDOUT: import Core//prelude/operators/comparison
|
||||
// CHECK:STDOUT: import Core//prelude/types/bool
|
||||
|
||||
Reference in new issue
Block a user