Skip to content

Instantly share code, notes, and snippets.

結論

  • 2.11.x で発生する
  • private なフィールドがラムダ式内で直接参照されている場合、コンパイル後のフィールド名が $$ 区切りの FQCN みたいな名前になる
  • Getter などを経由して参照すれば発生しなくなる
  • 2.12.x ならラムダ式内から直接参照していても発生しない

検証

Hoge.scala

@opengl-8080
opengl-8080 / memo.md
Created December 25, 2015 13:54
gs collections ver 7

Breaking Changes MutableCollection.removeIf() now returns boolean. Sorted sets, bags, and maps implement ReversibleIterable. Added OrderedMap interface to represent a linked hash map. Overrode BiMap.partition() to return PartitionUnsortedSet. UnifiedMap and UnifiedSet now throw if constructed with a load factor greater than 1. toStringOfItemToCount() in ImmutableEmptyBag now consistent with other Bags. Returns "{}" instead of "" New Functionality Primitive Collections

List.binarySearch() Fixes #20

@opengl-8080
opengl-8080 / Main.java
Last active September 22, 2015 12:30
配列の型引数は信用できない
package sample;
import java.util.ArrayList;
import java.util.List;
public class Main {
/**
* 配列の場合、型引数が指定されていても、別のクラスのオブジェクトをセットできる余地がある。
*
@opengl-8080
opengl-8080 / gist:bcd710b031ec1c903f0f
Created October 18, 2014 04:22
Groovyのスクリプト内で宣言されたクラス
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3)
// Source File Name: script.groovy
import groovy.lang.GroovyObject;
import groovy.lang.MetaClass;
import java.lang.ref.SoftReference;
import org.codehaus.groovy.reflection.ClassInfo;
import org.codehaus.groovy.runtime.GStringImpl;
@opengl-8080
opengl-8080 / gist:910c0aa46c4afbeb5b63
Created October 18, 2014 02:47
Groovyのクロージャを逆コンパイルした結果
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3)
// Source File Name: script.groovy
import groovy.lang.*;
import java.io.File;
import java.lang.ref.SoftReference;
import org.codehaus.groovy.reflection.ClassInfo;
import org.codehaus.groovy.runtime.*;
@opengl-8080
opengl-8080 / gist:c966b997b5f50bcbbfdb
Created October 17, 2014 12:15
HelloWorldを逆コンパイルした結果
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3)
// Source File Name: script.groovy
import groovy.lang.*;
import java.io.File;
import java.lang.ref.SoftReference;
import org.codehaus.groovy.reflection.ClassInfo;
import org.codehaus.groovy.runtime.*;