Schema.SObjectField field = MyObject__c.myField__c; Schema.SObjectType objectType = getTypeOf(field);
getTypeOfField() need to look like for this to be true?
While I really hope there is an easier way to achieve this, the Tooling API might be one candidate.
You can interrogate the Salesforce Tooling API with an Apex library or just use the code below by itself:
There are a number of caveats which would need serious 'hardening':