Skip to content

Commit 0c34723

Browse files
committed
and just like that
1 parent e81ec21 commit 0c34723

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ast/ast_infer_type.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8783,7 +8783,7 @@ namespace das {
87838783
mks->makeType = make_smart<TypeDecl>(*aliasT);
87848784
return mks;
87858785
}
8786-
} else if ( aliasT->isStructure() ) {
8786+
} else if ( aliasT->isStructure() && expr->arguments.empty() ) {
87878787
// this is Struct() - so we promote to default<Struct>
87888788
reportAstChanged();
87898789
auto mks = make_smart<ExprMakeStruct>(expr->at);
@@ -9293,7 +9293,7 @@ namespace das {
92939293
}
92949294
error("constructor can't be inferred " + describeType(expr->makeType),
92959295
reportInferAliasErrors(expr->makeType), "", expr->makeType->at, CompilationError::function_not_found );
9296-
} else if ( expr->constructor->arguments.size() ) {
9296+
} else if ( expr->constructor->arguments.size() && expr->structs.empty() ) {
92979297
// this one with default arguments, we demote back to call
92989298
reportAstChanged();
92999299
auto callName = expr->constructor->module->name + "::" + expr->constructor->name;

0 commit comments

Comments
 (0)