Zend certified PHP/Magento developer

GPG fails to prevent me from signing a file with a subkey with no sign capability

I’m learning GPG,

I’ve created a primary key and subkeys for different usage on an air-gapped laptop. Then I’ve successfully transfered the subkeys to my dirty laptop.

When I try to sign a file with —default-key set to a encrypt E only subkey, it works. I expected it to fail.

GPG fails to tell me that this key cannot be used to sign something.
Does GPG enforce subkey usage by default?