void bug4270() { try{} catch(int banana) {} } -- Error: can only catch class objects, not 'int' -- PATCH: statement.c 4197 void Catch::semantic(Scope *sc) type = type->semantic(loc, sc); if (!type->toBasetype()->isClassHandle()) - error("can only catch class objects, not '%s'", type->toChars()); + error(loc, "can only catch class objects, not '%s'", type->toChars());
Bug 3712 is a combination of this bug, with a D1-only error.
An idea: comment out the error() that doesn't accept a line number, then fix all calling points that use it.
(In reply to comment #2) > An idea: comment out the error() that doesn't accept a line number, then fix > all calling points that use it. That's exactly how I found this one! There are four uses of the wrong function. It's discussed in dmd-internals.
http://www.dsource.org/projects/dmd/changeset/532
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル