Skip to content

Commit cccba27

Browse files
driusanircmaxell
authored andcommitted
Fix PhanTypeMismatchArgumentInternal class error (#33)
There aren't actually any errors of this type, only a bug with phan not interpretting FFI assignments properly.
1 parent 1ef6616 commit cccba27

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

.phan/config.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
'PhanUndeclaredProperty',
2929
'PhanTypeNonVarPassByRef',
3030
'PhanUnusedGotoLabel',
31-
'PhanTypeMismatchArgumentInternal',
3231
'PhanTypeMismatchDimFetch',
3332
'PhanTypeMismatchDimAssignment',
3433
'PhanTypeMismatchDimFetch',

lib/JIT/Result.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ public function getCallable(string $funcName, string $callbackType): callable {
6060
$cb = FFI::new($callbackType);
6161
FFI::memcpy(
6262
FFI::addr($cb),
63+
// Incorrectly flagged due to https://github.com/phan/phan/issues/2659
64+
// @phan-suppress-next-line PhanTypeMismatchArgumentInternal
6365
FFI::addr($code),
6466
FFI::sizeof($cb)
6567
);

0 commit comments

Comments
 (0)