Bug 377 – Compiler error when using -inline only

Status
RESOLVED
Resolution
FIXED
Severity
major
Priority
P1
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
Windows
Creation time
2006-09-27T10:19:00Z
Last change time
2014-02-15T13:20:18Z
Keywords
rejects-valid
Assigned to
bugzilla
Creator
boris.kolar

Comments

Comment #0 by boris.kolar — 2006-09-27T10:19:06Z
Compile the following application with: # dmd.exe -inline -c main.d ... 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; }
Comment #1 by smjg — 2006-09-27T16:04:31Z
Please report compiler messages in full. Normally, you should copy and paste the full compiler output.
Comment #2 by boris.kolar — 2006-09-28T05:09:45Z
Full, verbose compiler output (input is file main.d, described in the first post): # dmd.exe -v -inline main.d 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
Comment #3 by thomas-dloop — 2006-09-29T03:20:40Z
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 [email protected] schrieb am 2006-09-27: > http://d.puremagic.com/issues/show_bug.cgi?id=377 > Compile the following application with: > # dmd.exe -inline -c main.d > ... 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-----
Comment #4 by bugzilla — 2006-10-10T03:27:48Z
Fixed DMD 0.169