On Thursday, August 24, 2017 at 11:56:53 AM UTC+2, James Cheng wrote: > How could I make it compile error? > > I did write > > RefPtr<Foo> xxx = yyy; > xxx.forget();
You need to run the static analyser. The documentation about MOZ_MUST_USE_TYPE is explained there http://searchfox.org/mozilla-central/source/mfbt/Attributes.h#519-521. This is why you should always do a try run, because the static analyser *will* choke on this code. _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform