Eighty Polish children and adolescents aged from 6 to 18 participated in a nonce word inflection experiment testing their productivity with the two genitive masculine endings, -a and -u, and their sensitivity to the distributional and semantic factors determining the choice of ending. All participants were able to use at least one ending productively, although the youngest children did not do so consistently, confirming earlier research which suggests that children are only partially productive with these inflections. In the youngest group, the choice of ending was not influenced by either semantic or distributional cues. Participants began to show sensitivity to distributional cues from about ten years of age; the strength of this sensitivity continued to increase right up to age 18. However, only a few of the oldest participants were also sensitive to the semantic factors determining the choice of ending. Another unexpected finding was a sharp increase in the number of gender errors around age 14, suggesting that the system might be undergoing a reorganization at this late age. The experiment also revealed considerable individual differences in the rate of development as well as the actual generalizations that learners extract. The results challenge the widely-held view that learners' mental grammars reach a steady state in early or middle childhood, and that speakers of the same dialect acquire the same set of rules.