Preheat the oven to 200°C/gas mark 6. Combine the strawberries, raspberries, sugar and cornflour in a bowl.
Lay the pastry out. Turn a 16 x 10cm enamel pie dish upside down on top of it and cut around it twice, so you have two pieces of pastry. Using a 2½cm heart cutter, cut 6 hearts out of each piece.
Fill two pie dishes with the fruit and top with the pastry, pressing the edges to the sides of the dish to seal it. Brush the top with the beaten egg. Place on a baking sheet and bake for 30 minutes, until golden on top.