Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docfix #569

Merged
merged 6 commits into from
Jul 18, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix partial.__name__
  • Loading branch information
inumanag committed Jul 5, 2024
commit 7fb39ef94b0de8b79e993f83f17204c074524c77
4 changes: 4 additions & 0 deletions codon/parser/visitors/typecheck/access.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@ ExprPtr TypecheckVisitor::transformDot(DotExpr *expr,
if (expr->expr->type->getFunc() && expr->member == "__name__") {
return transform(N<StringExpr>(expr->expr->type->prettyString()));
}
if (expr->expr->type->getPartial() && expr->member == "__name__") {
return transform(
N<StringExpr>(expr->expr->type->getPartial()->func->prettyString()));
}
// Special case: fn.__llvm_name__ or obj.__llvm_name__
if (expr->member == "__llvm_name__") {
if (realize(expr->expr->type))
Expand Down