Skip to content

Remove type hints on Loggable so it can be implemented by Hack code transpiled with h2tp#9

Open
jesseschalken wants to merge 1 commit into
masterfrom
remove-loggable-type-hints
Open

Remove type hints on Loggable so it can be implemented by Hack code transpiled with h2tp#9
jesseschalken wants to merge 1 commit into
masterfrom
remove-loggable-type-hints

Conversation

@jesseschalken

@jesseschalken jesseschalken commented Dec 9, 2016

Copy link
Copy Markdown
Contributor

This is necessary because PHP enforces that method signatures are compatible with implemented interfaces when a class is loaded.

In Hack, the Hack typechecker serves this role instead (and more correctly), but the output of the h2tp transpiler doesn't include the type annotations (which it can't generally because Hack's type system is much more expressive than PHP's), causing PHP to bark about method compatibility when the class is loaded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant