Skip to content

Commit

Permalink
Fixed placement of warning message.
Browse files Browse the repository at this point in the history
  • Loading branch information
InsertCreativityHere committed Jan 14, 2025
1 parent 3b18c5d commit f231569
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions cpp/src/Slice/Parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1187,8 +1187,8 @@ Slice::Container::createClassDef(const string& name, int id, const ClassDefPtr&

// Implicitly create a class declaration for each class definition.
// This way the code generator can rely on always having a class declaration available for lookup.
ClassDeclPtr decl = createClassDecl(name);
ClassDefPtr def = make_shared<ClassDef>(shared_from_this(), name, id, base);
ClassDeclPtr decl = createClassDecl(name);
def->_declaration = decl;
decl->_definition = def;

Expand Down Expand Up @@ -1321,8 +1321,8 @@ Slice::Container::createInterfaceDef(const string& name, const InterfaceList& ba

// Implicitly create an interface declaration for each interface definition.
// This way the code generator can rely on always having an interface declaration available for lookup.
InterfaceDeclPtr decl = createInterfaceDecl(name);
InterfaceDefPtr def = make_shared<InterfaceDef>(shared_from_this(), name, bases);
InterfaceDeclPtr decl = createInterfaceDecl(name);
def->_declaration = decl;
decl->_definition = def;

Expand Down
2 changes: 1 addition & 1 deletion cpp/test/Slice/errorDetection/WarningInvalidMetadata.err
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ WarningInvalidMetadata.ice:31: warning: the 'cpp:no-default-include' metadata do
WarningInvalidMetadata.ice:34: warning: 'amd' metadata cannot be specified as file metadata
WarningInvalidMetadata.ice:40: warning: the 'cpp:header-ext' metadata only accepts one argument but a list was provided
WarningInvalidMetadata.ice:40: warning: 'cpp:header-ext' metadata cannot be applied to sequences
WarningInvalidMetadata.ice:44: warning: ignoring duplicate metadata: 'deprecated:do not use this' does not match previously applied metadata of 'deprecated'
WarningInvalidMetadata.ice:48: warning: ignoring unknown metadata: 'unknown'
WarningInvalidMetadata.ice:48: warning: ignoring unknown metadata: 'cpp:unknown'
WarningInvalidMetadata.ice:48: warning: ignoring unknown metadata: 'bad:unknown'
WarningInvalidMetadata.ice:56: warning: the 'protected' metadata does not take any arguments
WarningInvalidMetadata.ice:56: warning: the 'cpp:array' metadata does not take any arguments
WarningInvalidMetadata.ice:56: warning: 'cpp:array' metadata can only be applied to operation parameters and return types
WarningInvalidMetadata.ice:44: warning: ignoring duplicate metadata: 'deprecated:do not use this' does not match previously applied metadata of 'deprecated'
WarningInvalidMetadata.ice:62: warning: 'cpp:type' metadata cannot be applied to operations with void return type
WarningInvalidMetadata.ice:65: warning: 'cpp:array' metadata cannot be applied to operations with void return type
WarningInvalidMetadata.ice:68: warning: invalid argument 'my_string' supplied to 'cpp:type' metadata in this context
Expand Down

0 comments on commit f231569

Please sign in to comment.