Skip to content

Commit 123b740

Browse files
test error message
1 parent 71473d3 commit 123b740

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

mypyc/test-data/irbuild-classes.test

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2686,3 +2686,14 @@ L0:
26862686
r6 = PyObject_VectorcallMethod(r3, r5, 9223372036854775812, 0)
26872687
keep_alive r2, self, key, val
26882688
return 1
2689+
2690+
[case testInvalidMypycAttr]
2691+
@mypyc_attr("allow_interpreted_subclasses", "invalid_arg") # E: 'invalid_arg' is not a supported `mypyc_attr`
2692+
class InvalidArg:
2693+
pass
2694+
@mypyc_attr(invalid_kwarg=True) # E: 'invalid_kwarg' is not a supported `mypyc_attr`
2695+
class InvalidKwarg:
2696+
pass
2697+
@mypyc_attr(str()) # E: All `mypyc_attr` args must be string literals.
2698+
class InvalidLiteral:
2699+
pass

0 commit comments

Comments
 (0)