Fide laws of chess 3.9:
The king is said to be 'in check' if it is attacked by one or more of the opponent's pieces, even if such pieces are constrained from moving to that square because they would then leave or place their own king in check. No piece can be moved that will either expose the king of the same colour to check or leave that king in check.
That should clear up any doubts. For those who may not understand the reasoning:
The key phrase is "attacked", which is not the same as "able to be taken on the next move". Whether or not a piece is pinned (i.e. it would be illegal to move it) doesn't change its ability to attack a piece or square. That is only a function of the type of piece (bishops capture diagonally, etc.) and not dependant on other board features (like so-called "pins", which aren't explicitly mentioned anywhere in the rules).
But the point is this: how can a piece that cannot move be a threat?