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

Floats with zero decimal part become ints #7

Open
arnsholt opened this issue Sep 3, 2010 · 0 comments
Open

Floats with zero decimal part become ints #7

arnsholt opened this issue Sep 3, 2010 · 0 comments

Comments

@arnsholt
Copy link
Member

arnsholt commented Sep 3, 2010

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);
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant