ספר המדות, A Righteous Person / Part I A Righteous Person / Part I · נ
Sefer HaMiddot 2061
נ. הַמּוֹנֵעַ הֲלָכָה מִתַּלְמִידוֹ, כְּאִלּוּ גּוֹזְלוֹ מִנַּחֲלַת אֲבוֹתָיו, וַאֲפִלּוּ עֻבָּרִין שֶׁבִּמְעֵי אִמָּן מְקַלְּלִין אוֹתוֹ וּמְנַקְּבִין אוֹתוֹ כִּכְבָרָה. וְאִם לִמְּדוֹ זוֹכֶה לִבְרָכוֹת כְּיוֹסֵף, וְזוֹכֶה וּמְלַמְּדָהּ לָעוֹלָם הַבָּא.
50. One who withholds a halacha (Torah law) from his student is as if he stole the student's ancestral inheritance. Even fetuses in their mothers' wombs curse him and pierce him full of holes as a sieve. If he teaches him (/it -- the student or the halacha), he merits to blessings like Joseph, and merits to teach it also in the World to Come (t.n. In the Talmud this last point is a new one, objective of the halacha, not subjective to a student).