From 4fdcdd126a4b5ce365b97eb498536d04caee3b53 Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Fri, 10 Jul 2020 02:51:00 +0200 Subject: [test] this covers more eclipse versions --- .../CheckerFrameworkSuperBuilder.java | 30 +++++++++++----------- .../resource/after-delombok/ValLambda.java | 6 +++-- 2 files changed, 19 insertions(+), 17 deletions(-) (limited to 'test/transform/resource/after-delombok') diff --git a/test/transform/resource/after-delombok/CheckerFrameworkSuperBuilder.java b/test/transform/resource/after-delombok/CheckerFrameworkSuperBuilder.java index 0f7f8997..e0daad32 100644 --- a/test/transform/resource/after-delombok/CheckerFrameworkSuperBuilder.java +++ b/test/transform/resource/after-delombok/CheckerFrameworkSuperBuilder.java @@ -124,7 +124,7 @@ class CheckerFrameworkSuperBuilder { return new CheckerFrameworkSuperBuilder.Parent.ParentBuilderImpl(); } } - public static class Child extends Parent { + public static class ZChild extends Parent { int a; int b; @java.lang.SuppressWarnings("all") @@ -132,7 +132,7 @@ class CheckerFrameworkSuperBuilder { return 1; } @java.lang.SuppressWarnings("all") - public static abstract class ChildBuilder> extends Parent.ParentBuilder { + public static abstract class ChildBuilder> extends Parent.ParentBuilder { @java.lang.SuppressWarnings("all") private boolean a$set; @java.lang.SuppressWarnings("all") @@ -147,17 +147,17 @@ class CheckerFrameworkSuperBuilder { @org.checkerframework.dataflow.qual.SideEffectFree @java.lang.Override @java.lang.SuppressWarnings("all") - public abstract C build(@org.checkerframework.checker.builder.qual.CalledMethods("b") CheckerFrameworkSuperBuilder.Child this); + public abstract C build(@org.checkerframework.checker.builder.qual.CalledMethods("b") CheckerFrameworkSuperBuilder.ZChild this); @org.checkerframework.checker.builder.qual.ReturnsReceiver @java.lang.SuppressWarnings("all") - public B a(@org.checkerframework.checker.builder.qual.NotCalledMethods("a") CheckerFrameworkSuperBuilder.Child.ChildBuilder this, final int a) { + public B a(@org.checkerframework.checker.builder.qual.NotCalledMethods("a") CheckerFrameworkSuperBuilder.ZChild.ZChildBuilder this, final int a) { this.a$value = a; a$set = true; return self(); } @org.checkerframework.checker.builder.qual.ReturnsReceiver @java.lang.SuppressWarnings("all") - public B b(@org.checkerframework.checker.builder.qual.NotCalledMethods("b") CheckerFrameworkSuperBuilder.Child.ChildBuilder this, final int b) { + public B b(@org.checkerframework.checker.builder.qual.NotCalledMethods("b") CheckerFrameworkSuperBuilder.ZChild.ZChildBuilder this, final int b) { this.b = b; return self(); } @@ -165,41 +165,41 @@ class CheckerFrameworkSuperBuilder { @java.lang.Override @java.lang.SuppressWarnings("all") public java.lang.String toString() { - return "CheckerFrameworkSuperBuilder.Child.ChildBuilder(super=" + super.toString() + ", a$value=" + this.a$value + ", b=" + this.b + ")"; + return "CheckerFrameworkSuperBuilder.ZChild.ZChildBuilder(super=" + super.toString() + ", a$value=" + this.a$value + ", b=" + this.b + ")"; } } @java.lang.SuppressWarnings("all") - private static final class ChildBuilderImpl extends CheckerFrameworkSuperBuilder.Child.ChildBuilder { + private static final class ZChildBuilderImpl extends CheckerFrameworkSuperBuilder.ZChild.ZChildBuilder { @org.checkerframework.common.aliasing.qual.Unique @java.lang.SuppressWarnings("all") - private ChildBuilderImpl() { + private ZChildBuilderImpl() { } @java.lang.Override @org.checkerframework.checker.builder.qual.ReturnsReceiver @org.checkerframework.dataflow.qual.Pure @java.lang.SuppressWarnings("all") - protected CheckerFrameworkSuperBuilder.Child.ChildBuilderImpl self() { + protected CheckerFrameworkSuperBuilder.ZChild.ZChildBuilderImpl self() { return this; } @org.checkerframework.dataflow.qual.SideEffectFree @java.lang.Override @java.lang.SuppressWarnings("all") - public CheckerFrameworkSuperBuilder.Child build(@org.checkerframework.checker.builder.qual.CalledMethods("b") CheckerFrameworkSuperBuilder.Child.ChildBuilderImpl this) { - return new CheckerFrameworkSuperBuilder.Child(this); + public CheckerFrameworkSuperBuilder.ZChild build(@org.checkerframework.checker.builder.qual.CalledMethods("b") CheckerFrameworkSuperBuilder.ZChild.ZChildBuilderImpl this) { + return new CheckerFrameworkSuperBuilder.ZChild(this); } } @org.checkerframework.dataflow.qual.SideEffectFree @java.lang.SuppressWarnings("all") - protected Child(final CheckerFrameworkSuperBuilder.Child.ChildBuilder b) { + protected ZChild(final CheckerFrameworkSuperBuilder.ZChild.ZChildBuilder b) { super(b); if (b.a$set) this.a = b.a$value; - else this.a = CheckerFrameworkSuperBuilder.Child.$default$a(); + else this.a = CheckerFrameworkSuperBuilder.ZChild.$default$a(); this.b = b.b; } @org.checkerframework.dataflow.qual.SideEffectFree @java.lang.SuppressWarnings("all") - public static CheckerFrameworkSuperBuilder.Child.ChildBuilder builder() { - return new CheckerFrameworkSuperBuilder.Child.ChildBuilderImpl(); + public static CheckerFrameworkSuperBuilder.ZChild.ZChildBuilder builder() { + return new CheckerFrameworkSuperBuilder.ZChild.ZChildBuilderImpl(); } } } \ No newline at end of file diff --git a/test/transform/resource/after-delombok/ValLambda.java b/test/transform/resource/after-delombok/ValLambda.java index 24ae3b5f..910e3506 100644 --- a/test/transform/resource/after-delombok/ValLambda.java +++ b/test/transform/resource/after-delombok/ValLambda.java @@ -1,4 +1,6 @@ // version 8: +import java.io.Serializable; + class ValLambda { static { final java.lang.Runnable foo = (System.currentTimeMillis() > 0) ? (Runnable) () -> { @@ -15,8 +17,8 @@ class ValLambda { }; } - public void easyIntersectionLambda() { - final java.lang.Runnable foo = (Runnable & java.io.Serializable) () -> { + public void intersectionLambda() { + final java.io.Serializable foo = (Runnable & Serializable) () -> { }; final java.io.Serializable bar = (java.io.Serializable & Runnable) () -> { }; -- cgit