xp-framework / compiler

Compiles future PHP to today's PHP.
19 stars 0 forks source link

PHP 8.1: Implicit conversion from non-compatible float 1.5 to int #112

Closed thekid closed 3 years ago

thekid commented 3 years ago

See https://github.com/xp-framework/compiler/runs/2740323361?check_suite_focus=true#step:10:14

F unittest.TestWarning(test= lang.ast.unittest.emit.DeclareTest::no_strict_types, time= 0.001 seconds) {
  unittest.Warnings(1)@{
    "Implicit conversion from non-compatible float 1.5 to int" in T11::number() (T11, line 2, occured once)
  }
}
F unittest.TestWarning(test= lang.ast.unittest.emit.DeclareTest::strict_types_off, time= 0.001 seconds) {
  unittest.Warnings(1)@{
    "Implicit conversion from non-compatible float 1.5 to int" in T12::number() (T12, line 2, occured once)
  }
}
thekid commented 3 years ago

See also #102 - we can clearly see PHP 8.1 is a moving target :-)

thekid commented 3 years ago

Fixed, see https://github.com/xp-framework/compiler/runs/2766062782 (all green again!)