Skip to content

[TRACKER] PR #380 #382

@jaibugbot

Description

@jaibugbot
Emailed In Reported Version Latest Broken Version Latest Broken Platforms Fix Version
beta-0.1.096 beta-0.2.010 windows, linux -

Description

For some reason, it compiles and gives unexpected result (a = void/void)

Buggy Code

#import "Basic";
main :: () {
    a := ifx 1 == { case 1; 42; }
    print("% %\n", a, type_of(a));
    assert(type_of(a) == int);
    assert(a == 42);
}

Workarounds

-

Latest Test Outputs


windows
Compiler Error Output

In Workspace 2 ("Target Program"):
C:/Users/Private/Desktop/testo_runner/_work/JaiCommunityBugTrackerDev/JaiCommunityBugTrackerDev/compiler_bugs/382_380_REC0.jai:6,12: Error: Type mismatch. Type wanted: void; type given: s64.

    print("% %\n", a, type_of(a));
    assert(type_of(a) == int);
    assert(a == 42);
           ^^^^^^^


linux
Compiler Error Output

In Workspace 2 ("Target Program"):
/home/ubuntu/Desktop/actions-runner/_work/JaiCommunityBugTrackerDev/JaiCommunityBugTrackerDev/compiler_bugs/382_380_REC0.jai:6,12: Error: Type mismatch. Type wanted: void; type given: s64.

    print("% %\n", a, type_of(a));
    assert(type_of(a) == int);
    assert(a == 42);
           ^^^^^^^



History V1

Version Windows Linux Mac
beta-0.2.010 ❌ - ExitCode -1 ❌ - ExitCode -1 -
beta-0.2.009 ❌ - ExitCode -1 ❌ - ExitCode -1 -
beta-0.2.008 ❌ - ExitCode -1 ❌ - ExitCode -1 -
beta-0.2.007 ❌ - ExitCode -1 ❌ - ExitCode -1 -
beta-0.2.006 ❌ - ExitCode -1 ❌ - ExitCode -1 -
beta-0.2.005 ❌ - ExitCode -1 ❌ - ExitCode -1 -
beta-0.2.004 ❌ - ExitCode -1 ❌ - ExitCode -1 -
beta-0.2.003 ❌ - ExitCode -1 ❌ - ExitCode -1 -
beta-0.2.002 ❌ - ExitCode -1 ❌ - ExitCode -1 -
beta-0.2.001 ❌ - ExitCode -1 ❌ - ExitCode -1 -
beta-0.1.096 ❌ - ExitCode -1 ❌ - ExitCode -1 -

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions