Ibrahim (may Allah have mercy on him) says: Oaths are of four kinds; two have expiation and two do not. A man's saying: By Allah! I did not do it, and: By Allah! I did do it, has no expiation in any of it; if he said it deliberately, it is a lie, and if he believed it to be as he said, it is a laghw (idle) oath. And a man's saying: By Allah! I will not do it, and: By Allah! I will certainly do it, has expiation in it.
The Shaykh said: Layth and Hammad bin Abi Sulayman are not used as proof, and Allah knows best.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الأيمان / 19882