Skip to content

Cannot call proc with const proc arguemnt with the name of a proc #5636

@SaculRennorb

Description

@SaculRennorb

Context

    Odin:    dev-2025-08:f926c1861
    OS:      Windows 10 Enterprise N (version: 22H2), build 19045.5371
    CPU:     Intel(R) Core(TM) i5-8400 CPU @ 2.80GHz
    RAM:     65470 MiB
    Backend: LLVM 20.1.0

which is very slightly modified (#5631) from
f926c18
(reports as the same hash, but i think its lying there?)


Very brief conversation about the reason for this (not the hash thing, the issue the ticket is about):
https://discord.com/channels/568138951836172421/568871298428698645/1411397075136024588

Expected Behavior

I would expect to able to call a proc with the signature of proc($p : proc()) with the name of a (different) proc, as proc declarations use the ::, declaring them as constant.

Current Behavior

package main

c :: proc(a, b : rawptr) {  }

fn :: proc($p : proc(a, b : rawptr)) { }

main :: proc()
{
    fn(c) // Excpected constant procedure value for the argument 'p'
}

Steps to Reproduce

  1. copy the provided sample into a odin source file.
  2. build the source with odin build .
  3. observe the error

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions