Melt the butter and chocolate in a metal bowl set in a skillet of barely simmering water, or in the top of a double boiler. Stir frequently with a rubber spatula until the mixture is melted and smooth. Remove the bowl from the water or double boiler. Stir in the sugar, vanilla, and salt. Stir in the egg. Add the flour and stir until the mixture is smooth and glossy and cohesive, about a minute. Cover and refrigerate until the filling thickens and is fudgy, at least 1 hour.