www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 377] New: Compiler error when using -inline only

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=377

           Summary: Compiler error when using -inline only
           Product: D
           Version: 0.167
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: major
          Priority: P1
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: boris.kolar globera.com


Compile the following application with:

... compiler will report 3 "is not an lvalue" error. No such error is reported
when -inline is ommited.

[main.d]
module Application;

struct List {
        void get() {}
}
struct Array {
        interface Model {
                List list();
        }
        List list() {
                return model ? model.list : List.init;
        }
        void item() {
                list.get;
        }
        private Model model;
}

int main(char[][] args) {
        return 0;
}


-- 
Sep 27 2006
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=377


smjg iname.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |smjg iname.com
           Keywords|                            |rejects-valid





Please report compiler messages in full.  Normally, you should copy and paste
the full compiler output.


-- 
Sep 27 2006
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=377






Full, verbose compiler output (input is file main.d, described in the first
post):

parse     main
semantic  Application
semantic2 Application
semantic3 Application
inline scan Application
main.d(11): (((this).model).list)() is not an lvalue
main.d(11): &(((this).model).list)() is not an lvalue
main.d(11): &(_init_11Application4List) is not an lvalue


-- 
Sep 28 2006
prev sibling next sibling parent Thomas Kuehne <thomas-dloop kuehne.cn> writes:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

d-bugmail puremagic.com schrieb am 2006-09-27:
 http://d.puremagic.com/issues/show_bug.cgi?id=377
 Compile the following application with:

 ... compiler will report 3 "is not an lvalue" error. No such error is reported
 when -inline is ommited.

 [main.d]
 module Application;

 struct List {
         void get() {}
 }
 struct Array {
         interface Model {
                 List list();
         }
         List list() {
                 return model ? model.list : List.init;
         }
         void item() {
                 list.get;
         }
         private Model model;
 }

 int main(char[][] args) {
         return 0;
 }
Added to DStress as http://dstress.kuehne.cn/run/i/inline_17_A.d Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFFHNeULK5blCcjpWoRArF1AJwLqzHtJpkQU51bnuwlgCivAr5yUQCfTUhO ZBvdWIFrYFn55/MgMvf6Rys= =hmI1 -----END PGP SIGNATURE-----
Sep 29 2006
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=377


bugzilla digitalmars.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED





Fixed DMD 0.169


-- 
Oct 10 2006