Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

15
LINES

< > BotCompany Repo | #1031647 // test_structure_lambdasAndAnonymousClasses

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (4102L/24K).

1  
// We can't deserialize lambdas so we just save them as null
2  
svoid test_structure_lambdasAndAnonymousClasses() {
3  
  IF0 lambda = () -> 0;
4  
  structure_Data d = new {
5  
    structure_ClassInfo newClass(Class c) {
6  
      structure_ClassInfo info = super.newClass(c);
7  
      print(c + " => " + info.nullInstances);
8  
      ret info;
9  
    }
10  
  };
11  
  assertEqualsVerbose("null", struct(lambda, d));
12  
  
13  
  Runnable anon = r {};
14  
  assertEqualsVerbose("null", struct(anon));
15  
}

Author comment

Began life as a copy of #1031248

download  show line numbers  debug dex  old transpilations   

Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt

No comments. add comment

Snippet ID: #1031647
Snippet name: test_structure_lambdasAndAnonymousClasses
Eternal ID of this version: #1031647/9
Text MD5: fbb8f75be8d4c1984a5502183b23d10c
Transpilation MD5: 12fcfefe5af8c7c9f82ea54ba0d73494
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-07-23 17:07:42
Source code size: 470 bytes / 15 lines
Pitched / IR pitched: No / No
Views / Downloads: 238 / 331
Version history: 8 change(s)
Referenced in: [show references]