mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-25 08:50:10 +01:00
Merge ClassDefinition and ClassDeclaration (#940)
This commit is contained in:
@@ -17,10 +17,9 @@ void Declaration::Print(llvm::raw_ostream& out) const {
|
||||
break;
|
||||
|
||||
case Kind::ClassDeclaration: {
|
||||
const ClassDefinition& class_def =
|
||||
cast<ClassDeclaration>(*this).definition();
|
||||
out << "class " << class_def.name() << " {\n";
|
||||
for (Nonnull<Member*> m : class_def.members()) {
|
||||
const auto& class_decl = cast<ClassDeclaration>(*this);
|
||||
out << "class " << class_decl.name() << " {\n";
|
||||
for (Nonnull<Member*> m : class_decl.members()) {
|
||||
out << *m;
|
||||
}
|
||||
out << "}\n";
|
||||
|
||||
Reference in New Issue
Block a user