Skip to content

Commit 70336a6

Browse files
olwangclaude
andcommitted
test: pass fixture for Python-dunder names being legal
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 36dac3b commit 70336a6

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// Python-style dunder names are NOT reserved — only the generated `__rss_` /
2+
// `__rsscript_` namespaces are. The port relies on dunder-named ports
3+
// (`__hash__`, `__eq__`, `__rfloordiv__`, ...) for 1:1 fidelity with tinygrad.
4+
fn __hash__(x: Int) -> Int {
5+
return x
6+
}
7+
8+
fn __eq__(a: Int, b: Int) -> Bool {
9+
return a == b
10+
}
11+
12+
fn main() -> Unit {
13+
return Unit
14+
}

0 commit comments

Comments
 (0)