JuliaPluto/Pluto.jl

`local function` works, but leads to multiple definitions error

已關閉

#3,545 建立於 2026年5月12日

 (1 則留言) (0 個反應) (0 位負責人)Julia (329 個分叉)batch import
good first issue

倉庫指標

星標
 (5,295 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

A cell in pluto:

begin
    local function f(x)
        x^3
    end
    f(2)
end

This runs as expected and f is not available outside the begin-block, but if another cell also defines local function f(), I still get a Multiple definitions for f error.

貢獻者指南