Bug 12917 – Error: expression lines of type lines does not have a boolean value
Status
RESOLVED
Resolution
WORKSFORME
Severity
major
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
All
Creation time
2014-06-14T06:03:30Z
Last change time
2022-08-25T10:34:42Z
Assigned to
No Owner
Creator
Timothee Cour
Comments
Comment #0 by timothee.cour2 — 2014-06-14T06:03:30Z
/+
dmd -version=A1 -c main.d
Error: expression lines of type lines does not have a boolean value
other versions ok
stuff is another module I have
+/
//main.d:
void test(){
version(A1)
fun([1]);
version(A2)
fun([1]);
version(A3)
fun([1]);
}
version(A1)
void fun(size_t[] lines){
import stuff;
if(!lines){}
}
version(A2)
void fun(){
size_t[] lines;
import stuff;
if(!lines){}
}
version(A3)
void fun(size_t[] lines_){
import stuff;
if(!lines_){}
}
Comment #1 by razvan.nitu1305 — 2022-08-25T10:34:42Z
This seems to have been fixed, as I cannot reproduce this. Compiling with `dmd -version=A1 -c main.d` successfully compiles the code for me.