Skip to content

部分函数返回值判断错误 #1292

Closed
@Redbeanw44602

Description

@Redbeanw44602

类似 #1260 ,也是最近出现的问题。
prob

可以复现问题的代码:

N = {
    p =  {nil,9}
}

function N:TestBug()
    local a = math.random(99)
    if a > 88 then
        return self.p[a]
    end
    return nil
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions