repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
d: Merge upstream dmd, druntime 4c18eed967, phobos d945686a4.
[official-gcc.git]
/
gcc
/
testsuite
/
gdc.test
/
fail_compilation
/
fail7173.d
blob
05ba7f9fc0a4da496a05482addacfc24e80853bb
1
/*
2
TEST_OUTPUT:
3
---
4
fail_compilation/fail7173.d(23): Error: expression `b1._a.opBinary(b2._a).fun()` is `void` and has no value
5
---
6
*/
7
struct
A
{
8
9
A
opBinary
(
string op
)(
A a
){
A rt
;
return
rt
; }
10
11
void
fun
(){ }
12
}
13
14
struct
B
{
15
16
A _a
;
17
alias
_a
this
;
18
}
19
20
21
void
main
(){
22
23
B b1
,
b2
,
b3
;
b3
= (
b1
-
b2
).
fun
();
24
}