Skip to content

Commit ebb228f

Browse files
committed
Add test with user-defined constant unary operators
Add test showing that user-defined unary operators do not cause a problem, even if they have constant types.
1 parent b6c2e30 commit ebb228f

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/pos/i5386.scala

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
object Test {
2+
23
~{
34
println("!")
45
1
@@ -22,4 +23,12 @@ object Test {
2223
{ println("1"); 1 } + { println("2"); 2}
2324

2425
!(try true finally{()})
26+
27+
28+
class C {
29+
def foo: 1 = 1
30+
}
31+
32+
{ println("!"); new C }.foo
33+
2534
}

0 commit comments

Comments
 (0)