File tree Expand file tree Collapse file tree 2 files changed +37
-0
lines changed
input/src/main/scala/fix/scala213
output/src/main/scala/fix/scala213 Expand file tree Collapse file tree 2 files changed +37
-0
lines changed Original file line number Diff line number Diff line change
1
+ /*
2
+ rule = fix.scala213.ExplicitNonNullaryApply
3
+ */
4
+ package fix .scala213
5
+
6
+ class ExplicitNonNullaryApplyOver {
7
+ class Meth { def d () = " " }
8
+ class Prop { def d = " " }
9
+
10
+ class Meth2Prop extends Meth { override def d = " " }
11
+ class Prop2Meth extends Prop { override def d () = " " }
12
+
13
+ val meth2prop = new Meth2Prop
14
+ val prop2meth = new Prop2Meth
15
+
16
+ meth2prop.d()
17
+ meth2prop.d // <- should call with parens
18
+ prop2meth.d()
19
+ prop2meth.d // <- should call with parens
20
+ }
Original file line number Diff line number Diff line change
1
+ package fix .scala213
2
+
3
+ class ExplicitNonNullaryApplyOver {
4
+ class Meth { def d () = " " }
5
+ class Prop { def d = " " }
6
+
7
+ class Meth2Prop extends Meth { override def d = " " }
8
+ class Prop2Meth extends Prop { override def d () = " " }
9
+
10
+ val meth2prop = new Meth2Prop
11
+ val prop2meth = new Prop2Meth
12
+
13
+ meth2prop.d()
14
+ meth2prop.d() // <- should call with parens
15
+ prop2meth.d()
16
+ prop2meth.d() // <- should call with parens
17
+ }
You can’t perform that action at this time.
0 commit comments