@@ -5,11 +5,22 @@ class Field extends @membervariable { string toString() { none() } }
5
5
class Location extends @location_default { string toString ( ) { none ( ) } }
6
6
class Type extends @usertype { string toString ( ) { none ( ) } }
7
7
8
+ pragma [ noopt]
9
+ predicate lambda_capture_new ( LambdaCapture lc , Lambda l , int i , Field f ,
10
+ boolean captured_by_reference , boolean is_implicit ,
11
+ Location loc )
12
+ {
13
+ exists ( Type t |
14
+ lambda_capture ( lc , l , i , captured_by_reference , is_implicit , loc ) and
15
+ expr_types ( l , t , _) and
16
+ t instanceof Type and
17
+ member ( t , i , f ) and
18
+ f instanceof Field
19
+ )
20
+ }
21
+
8
22
from LambdaCapture lc , Lambda l , int i , Field f ,
9
23
boolean captured_by_reference , boolean is_implicit ,
10
- Location loc , Type t
11
- where lambda_capture ( lc , l , i , captured_by_reference , is_implicit , loc )
12
- and expr_types ( l , t , _)
13
- and member ( t , i , f )
24
+ Location loc
25
+ where lambda_capture_new ( lc , l , i , f , captured_by_reference , is_implicit , loc )
14
26
select lc , l , i , f , captured_by_reference , is_implicit , loc
15
-
0 commit comments