Skip to content

Commit 4b5edf2

Browse files
committed
fix: avoid duplicated definition
1 parent 8dcd5a3 commit 4b5edf2

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

interop/klr/gather.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1625,18 +1625,16 @@ static void definition(struct state *st, PyObject *obj, char* suggested_name) {
16251625
case FunctionDef_kind:
16261626
if (st->scope.f) {
16271627
function(st, name, stmt);
1628-
if (suggested_name && strcmp(lean_string_cstr(name), suggested_name) != 0) {
1629-
function(st, lean_mk_string(suggested_name), stmt);
1630-
}
1628+
// Don't create duplicate definitions - they can cause qualification issues
1629+
// The function is already accessible through its original name
16311630
}
16321631
break;
16331632

16341633
case ClassDef_kind:
16351634
if (st->scope.cls) {
16361635
class(st, name, stmt);
1637-
if (suggested_name && strcmp(lean_string_cstr(name), suggested_name) != 0) {
1638-
class(st, lean_mk_string(suggested_name), stmt);
1639-
}
1636+
// Don't create duplicate definitions - they can cause qualification issues
1637+
// The class is already accessible through its original name
16401638
}
16411639
break;
16421640

0 commit comments

Comments
 (0)