Skip to content
This repository was archived by the owner on Feb 3, 2021. It is now read-only.

Floats with zero decimal part become ints #7

@arnsholt

Description

@arnsholt

Literal floats with zero decimal part become ints in PIR. For example PAST::Val.new(:value(1.0)) becomes $P16."new"(1 :named("value")) (SHA: 699da41). This works as a test:

sub are_floats_floats($x) {
    if !pir::isa($x, 'Float') {
        print('not ');
    }
    say('ok 1 - Float argument # TODO: PAST::Compiler bug');
}
are_floats_floats(1.0);

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