TypePHP 编译器
https://swoole.com/aot/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
464 B
20 lines
464 B
--TEST--
|
|
std map: unsafe_cast type mismatch
|
|
--FILE--
|
|
<?php
|
|
function std_map_unsafe_ptr_type_mismatch($source): void
|
|
{
|
|
$map = $source->toStdMap(complex_types::type_str, native_types::type_float);
|
|
}
|
|
|
|
function main() {
|
|
$map = std::map(complex_types::type_str, native_types::type_int);
|
|
try {
|
|
std_map_unsafe_ptr_type_mismatch($map);
|
|
} catch (TypeError $e) {
|
|
echo $e->getMessage(), "\n";
|
|
}
|
|
}
|
|
?>
|
|
--EXPECT--
|
|
std container type mismatch
|
|
|