File tree Expand file tree Collapse file tree 3 files changed +32
-1
lines changed
csharp/ql/test/library-tests/csharp8 Expand file tree Collapse file tree 3 files changed +32
-1
lines changed Original file line number Diff line number Diff line change
1
+ using System ;
2
+
3
+ interface IPerson
4
+ {
5
+ string Name { get ; }
6
+
7
+ string Greeting
8
+ {
9
+ get => "Hello" ;
10
+ set { }
11
+ }
12
+
13
+ string Greet ( string name ) => Greeting + " " + name ;
14
+
15
+ string GreetingString => Greet ( Name ) ;
16
+
17
+ void Greet ( ) ;
18
+ }
19
+
20
+ class Person : IPerson
21
+ {
22
+ public string Name => "Petra" ;
23
+
24
+ string IPerson . Greeting { get => "Howdy" ; set { } }
25
+
26
+ public void Greet ( ) { }
27
+ }
Original file line number Diff line number Diff line change
1
+ | DefaultInterfaceMethods.cs:9:9:9:11 | get_Greeting |
2
+ | DefaultInterfaceMethods.cs:10:9:10:11 | set_Greeting |
3
+ | DefaultInterfaceMethods.cs:13:12:13:16 | Greet |
4
+ | DefaultInterfaceMethods.cs:15:30:15:40 | get_GreetingString |
Original file line number Diff line number Diff line change 1
1
import csharp
2
2
3
- class DefaultInterfaceMethod extends Method {
3
+ class DefaultInterfaceMethod extends Callable {
4
4
DefaultInterfaceMethod ( ) {
5
5
this .hasBody ( ) and
6
6
this .getDeclaringType ( ) instanceof Interface
You can’t perform that action at this time.
0 commit comments