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).

// We can't deserialize lambdas so we just save them as null
svoid test_structure_lambdasAndAnonymousClasses() {
  IF0 lambda = () -> 0;
  structure_Data d = new {
    structure_ClassInfo newClass(Class c) {
      structure_ClassInfo info = super.newClass(c);
      print(c + " => " + info.nullInstances);
      ret info;
    }
  };
  assertEqualsVerbose("null", struct(lambda, d));
  
  Runnable anon = r {};
  assertEqualsVerbose("null", struct(anon));
}

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: 131 / 196
Version history: 8 change(s)
Referenced in: [show references]