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
415 B
20 lines
415 B
--TEST--
|
|
std vector: unsafe_cast type mismatch
|
|
--FILE--
|
|
<?php
|
|
function std_vector_unsafe_ptr_type_mismatch($source): void
|
|
{
|
|
$vector = $source->toStdVector(Type::Float);
|
|
}
|
|
|
|
function main() {
|
|
$vector = std::vector(Type::Int, 3);
|
|
try {
|
|
std_vector_unsafe_ptr_type_mismatch($vector);
|
|
} catch (TypeError $e) {
|
|
echo $e->getMessage(), "\n";
|
|
}
|
|
}
|
|
?>
|
|
--EXPECT--
|
|
std container type mismatch
|
|
|