typedef bool CALLBACK(); //不指定返回类型,此时默认为dynamic,不是bool isNoble(int atomicNumber) { return _nobleGases[atomicNumber] != null; } void test(CALLBACK cb){ print(cb()); } //报错,isNoble不是bool类型 test(isNoble); isNoble同时也不满住typedef定义的无参数