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

Comma between params isnt needed for two param proc #4278

Open
FourteenBrush opened this issue Sep 20, 2024 · 1 comment · May be fixed by #4280
Open

Comma between params isnt needed for two param proc #4278

FourteenBrush opened this issue Sep 20, 2024 · 1 comment · May be fixed by #4280
Labels
replicated We were able to replicate the bug.

Comments

@FourteenBrush
Copy link
Contributor

FourteenBrush commented Sep 20, 2024

Context

The following code compiles and runs just fine, despite a missing comma between the parameters, note that this is only reproducible with two parameters:

package bug

import "core:fmt"

main :: proc() {
    something(1, 2)
}

something :: proc(x: int y: int) {
    fmt.println("works fine")
}
  • Operating System & Odin Version:
  • Please paste odin report output:
        Odin:    dev-2024-09:c1264c2a7
        OS:      Fedora Linux 40 (KDE Plasma), Linux 6.10.8-200.fc40.x86_64
        CPU:     AMD Ryzen 7 5800H with Radeon Graphics         
        RAM:     13817 MiB
        Backend: LLVM 18.1.6

Expected Behavior

Compiler error stating missing comma

Steps to Reproduce

odin run file.odin -file

@Kelimion Kelimion added the replicated We were able to replicate the bug. label Sep 20, 2024
@Kelimion
Copy link
Member

Confirmed. x and y were even assigned the correct values.

package bug

import "core:fmt"

main :: proc() {
	something(1, 2)
}

something :: proc(x: int y: int) {
	fmt.printfln("works fine: x={} y={}", x, y)
}

Feoramund added a commit to Feoramund/Odin that referenced this issue Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
replicated We were able to replicate the bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants