A state treasurer has told a corruption inquiry he was asked by a developer's lawyer to air damaging claims about the then-building watchdog in parliament.