File tree 2 files changed +18
-10
lines changed 2 files changed +18
-10
lines changed Original file line number Diff line number Diff line change @@ -36,5 +36,22 @@ std::vector<std::string> getUnresolvedClassAttributes(const ClassDef& def) {
36
36
return ret;
37
37
}
38
38
39
+ /* static */ ClassDef ClassDef::create (
40
+ const SourceRange& range,
41
+ const Ident& name,
42
+ const Maybe<Expr>& superclass,
43
+ const List<Stmt>& body,
44
+ const List<Property>& properties,
45
+ const List<Assign>& assigns) {
46
+ return ClassDef (Compound::create (
47
+ TK_CLASS_DEF,
48
+ range,
49
+ {name,
50
+ superclass,
51
+ body,
52
+ Maybe<List<Property>>::create (range, properties),
53
+ Maybe<List<Assign>>::create (range, assigns)}));
54
+ }
55
+
39
56
} // namespace jit
40
57
} // namespace torch
Original file line number Diff line number Diff line change @@ -501,16 +501,7 @@ struct ClassDef : public TreeView {
501
501
const Maybe<Expr>& superclass,
502
502
const List<Stmt>& body,
503
503
const List<Property>& properties,
504
- const List<Assign>& assigns) {
505
- return ClassDef (Compound::create (
506
- TK_CLASS_DEF,
507
- range,
508
- {name,
509
- superclass,
510
- body,
511
- Maybe<List<Property>>::create (range, properties),
512
- Maybe<List<Assign>>::create (range, assigns)}));
513
- }
504
+ const List<Assign>& assigns);
514
505
};
515
506
516
507
TORCH_API std::vector<std::string> getUnresolvedClassAttributes (
You can’t perform that action at this time.
0 commit comments