File tree Expand file tree Collapse file tree 2 files changed +30
-0
lines changed
typesafety/test_typeclass/test_validation Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change 10
10
main:3: error: Typeclass definitions must not have bodies
11
11
12
12
13
+ - case : typeclass_with_body_and_associated_type
14
+ disable_cache : false
15
+ main : |
16
+ from classes import typeclass, AssociatedType
17
+
18
+ class Some(AssociatedType):
19
+ ...
20
+
21
+ @typeclass(Some)
22
+ def args(instance) -> str:
23
+ return 'a'
24
+ out : |
25
+ main:6: error: Typeclass definitions must not have bodies
26
+
27
+
13
28
- case : typeclass_with_two_ellipsises
14
29
disable_cache : false
15
30
main : |
Original file line number Diff line number Diff line change 31
31
main:3: error: First argument in typeclass definition must be positional
32
32
33
33
34
+ - case : typeclass_first_arg_opt_with_associated
35
+ disable_cache : false
36
+ main : |
37
+ from classes import typeclass, AssociatedType
38
+
39
+ class Some(AssociatedType):
40
+ ...
41
+
42
+ @typeclass(Some)
43
+ def args(instance: int = 1) -> str:
44
+ ...
45
+ out : |
46
+ main:6: error: First argument in typeclass definition must be positional
47
+
48
+
34
49
- case : typeclass_first_arg_star
35
50
disable_cache : false
36
51
main : |
You can’t perform that action at this time.
0 commit comments