Preheat oven to 180 C / Gas 4. Line an 20cm baking dish with baking paper, leaving an overhang on two sides.
Combine 120g plain flour, oats, 85g butter, brown sugar, 1/2 teaspoon vanilla extract and 1/4 teaspoon salt in a small bowl; mix with a fork to make a crumbly topping. Place in the fridge.
Combine 120g unsalted butter and icing sugar in a bowl; beat with an electric mixer until light and creamy. Add eggs and egg yolk one at a time, mixing well after each addition. Beat in lemon zest, rosemary and 1/2 teaspoon vanilla extract.
Mix 175g flour, 1/2 teaspoon baking powder and 1/8 teaspoon salt together in a separate bowl. Add to the fluffy butter mixture in 2 to 3 batches, mixing well after each addition, until a thick dough forms.
Spread dough in the bottom of the prepared baking dish. Arrange blackberries evenly on top. Stir crumb topping and sprinkle evenly over blackberries. Press down gently to pack topping down.
Bake in the preheated oven until a skewer inserted into the centre comes out clean, 40 to 45 minutes. Transfer to a cooling rack; let cool for 1 hour.
Lift traybake out of the dish using the overhanging paper. Slice into 12 squares using a long serrated knife.