From the test suite fail_compilation: fail8, fail72, fail123 have bad error messages with __error. fail10 has duplicated error msg fail14 has an error with no line number
From the test suite, fail228.d int ToTypeString (T:int) () { return 1; } int ToTypeString (T:string) () { return 2; } static assert(ToTypeString!(localVariable)()); ------------------- fail228.d(12): Error: undefined identifier localVariable fail228.d(12): Error: template fail228.ToTypeString(T : int) does not match any function template declaration fail228.d(12): Error: template fail228.ToTypeString(T : int) cannot deduce templ ate function from argument types !(_error_)() fail228.d(12): Error: template instance ToTypeString!(_error_) errors instantiat ing template
I created new bugs (bug 7465 and bug 7466) for the fail10 and fail14 cases. Apart from the bug in comment1, which I will call case A, the other known instances of _error are: // CASE B: from bug 6475 (and many other places) alias int b6699; alias b6699.x b6699a; crash.d(2): Error: no property 'x' for type 'int' crash.d(2): Error: alias crash.b6699a cannot alias an expression __error // CASE C: from fail72 void bug6699() { synchronized( foo ) { } } crash.d(3): Error: undefined identifier foo crash.d(3): Error: can only synchronize on class objects, not '_error_' // CASE D: from fail8 and fail123. struct Foo6699 { int x; } enum Bar6699 : Foo6699 { a, b } crash.d(3): Error: cannot implicitly convert expression (0) of type int to Foo66 99 Error: no property 'max' for type 'Foo6699' crash.d(3): Error: Integer constant expression expected instead of (__error) == (__error) See also bug 7462, bug 5302, and bug 6796, which also have _error.
I have moved case D into a new bug 7477, since it involves more thought (it isn't a simple error message issue). I also add case E, which contains 3 more __error bugs: class X : junk, junk2 {} interface X2 : junk3 {} crash.d(1): Error: undefined identifier junk crash.d(1): Error: undefined identifier junk2 crash.d(1): Error: class crash.X base type must be class or interface, not _error_ crash.d(1): Error: class crash.X base type must be interface, not _error_ crash.d(2): Error: undefined identifier junk3 crash.d(2): Error: interface crash.X2 base type must be interface, not _error_
https://github.com/D-Programming-Language/dmd/pull/704
Commit pushed to dmd-1.x at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/f81214cbdda5fe8080418e4ffed80a90f3c076fd fix issue 6699, fix issue 7462
(In reply to Don from comment #0) > From the test suite fail_compilation: > > fail10 has duplicated error msg It's fixed in 2.066-rc1.
Commit pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/def6905786701bbfe647f09ced0e30f772f5d1c1 fix Issue 6699 - More cases of __error in error messages
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル