Change tags to {WillNotCompile}
This commit is contained in:
parent
fe1aac1c73
commit
847890c3d4
@ -2,7 +2,7 @@
|
|||||||
// (c)2017 MindView LLC: see Copyright.txt
|
// (c)2017 MindView LLC: see Copyright.txt
|
||||||
// We make no guarantees that this code is fit for any purpose.
|
// We make no guarantees that this code is fit for any purpose.
|
||||||
// Visit http://OnJava8.com for more book information.
|
// Visit http://OnJava8.com for more book information.
|
||||||
// {CompileTimeError} (Will not compile)
|
// {WillNotCompile}
|
||||||
|
|
||||||
class Anything {}
|
class Anything {}
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
// (c)2017 MindView LLC: see Copyright.txt
|
// (c)2017 MindView LLC: see Copyright.txt
|
||||||
// We make no guarantees that this code is fit for any purpose.
|
// We make no guarantees that this code is fit for any purpose.
|
||||||
// Visit http://OnJava8.com for more book information.
|
// Visit http://OnJava8.com for more book information.
|
||||||
// {CompileTimeError} (Will not compile)
|
// {WillNotCompile}
|
||||||
import java.util.function.*;
|
import java.util.function.*;
|
||||||
|
|
||||||
public class Closure3 {
|
public class Closure3 {
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
// (c)2017 MindView LLC: see Copyright.txt
|
// (c)2017 MindView LLC: see Copyright.txt
|
||||||
// We make no guarantees that this code is fit for any purpose.
|
// We make no guarantees that this code is fit for any purpose.
|
||||||
// Visit http://OnJava8.com for more book information.
|
// Visit http://OnJava8.com for more book information.
|
||||||
// {CompileTimeError} (Will not compile)
|
// {WillNotCompile}
|
||||||
import java.util.function.*;
|
import java.util.function.*;
|
||||||
|
|
||||||
public class Closure5 {
|
public class Closure5 {
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
// (c)2017 MindView LLC: see Copyright.txt
|
// (c)2017 MindView LLC: see Copyright.txt
|
||||||
// We make no guarantees that this code is fit for any purpose.
|
// We make no guarantees that this code is fit for any purpose.
|
||||||
// Visit http://OnJava8.com for more book information.
|
// Visit http://OnJava8.com for more book information.
|
||||||
// {CompileTimeError} (Will not compile)
|
// {WillNotCompile}
|
||||||
import java.util.function.*;
|
import java.util.function.*;
|
||||||
|
|
||||||
public class Closure7 {
|
public class Closure7 {
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
// (c)2017 MindView LLC: see Copyright.txt
|
// (c)2017 MindView LLC: see Copyright.txt
|
||||||
// We make no guarantees that this code is fit for any purpose.
|
// We make no guarantees that this code is fit for any purpose.
|
||||||
// Visit http://OnJava8.com for more book information.
|
// Visit http://OnJava8.com for more book information.
|
||||||
// {CompileTimeError} (Will not compile)
|
// {WillNotCompile}
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.function.*;
|
import java.util.function.*;
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
// (c)2017 MindView LLC: see Copyright.txt
|
// (c)2017 MindView LLC: see Copyright.txt
|
||||||
// We make no guarantees that this code is fit for any purpose.
|
// We make no guarantees that this code is fit for any purpose.
|
||||||
// Visit http://OnJava8.com for more book information.
|
// Visit http://OnJava8.com for more book information.
|
||||||
// {CompileTimeError} (Will not compile)
|
// {WillNotCompile}
|
||||||
|
|
||||||
public class Erased<T> {
|
public class Erased<T> {
|
||||||
private final int SIZE = 100;
|
private final int SIZE = 100;
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
// (c)2017 MindView LLC: see Copyright.txt
|
// (c)2017 MindView LLC: see Copyright.txt
|
||||||
// We make no guarantees that this code is fit for any purpose.
|
// We make no guarantees that this code is fit for any purpose.
|
||||||
// Visit http://OnJava8.com for more book information.
|
// Visit http://OnJava8.com for more book information.
|
||||||
// {CompileTimeError} (Will not compile)
|
// {WillNotCompile}
|
||||||
|
|
||||||
class Cat
|
class Cat
|
||||||
extends ComparablePet implements Comparable<Cat>{
|
extends ComparablePet implements Comparable<Cat>{
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
// (c)2017 MindView LLC: see Copyright.txt
|
// (c)2017 MindView LLC: see Copyright.txt
|
||||||
// We make no guarantees that this code is fit for any purpose.
|
// We make no guarantees that this code is fit for any purpose.
|
||||||
// Visit http://OnJava8.com for more book information.
|
// Visit http://OnJava8.com for more book information.
|
||||||
// {CompileTimeError} (Will not compile)
|
// {WillNotCompile}
|
||||||
|
|
||||||
class Manipulator<T> {
|
class Manipulator<T> {
|
||||||
private T obj;
|
private T obj;
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
// (c)2017 MindView LLC: see Copyright.txt
|
// (c)2017 MindView LLC: see Copyright.txt
|
||||||
// We make no guarantees that this code is fit for any purpose.
|
// We make no guarantees that this code is fit for any purpose.
|
||||||
// Visit http://OnJava8.com for more book information.
|
// Visit http://OnJava8.com for more book information.
|
||||||
// {CompileTimeError} (Will not compile)
|
// {WillNotCompile}
|
||||||
package generics;
|
package generics;
|
||||||
|
|
||||||
interface Payable<T> {}
|
interface Payable<T> {}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
// (c)2017 MindView LLC: see Copyright.txt
|
// (c)2017 MindView LLC: see Copyright.txt
|
||||||
// We make no guarantees that this code is fit for any purpose.
|
// We make no guarantees that this code is fit for any purpose.
|
||||||
// Visit http://OnJava8.com for more book information.
|
// Visit http://OnJava8.com for more book information.
|
||||||
// {CompileTimeError} (Will not compile)
|
// {WillNotCompile}
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
public class NonCovariantGenerics {
|
public class NonCovariantGenerics {
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
// (c)2017 MindView LLC: see Copyright.txt
|
// (c)2017 MindView LLC: see Copyright.txt
|
||||||
// We make no guarantees that this code is fit for any purpose.
|
// We make no guarantees that this code is fit for any purpose.
|
||||||
// Visit http://OnJava8.com for more book information.
|
// Visit http://OnJava8.com for more book information.
|
||||||
// {CompileTimeError} (Will not compile)
|
// {WillNotCompile}
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
public class UseList<W, T> {
|
public class UseList<W, T> {
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
// (c)2017 MindView LLC: see Copyright.txt
|
// (c)2017 MindView LLC: see Copyright.txt
|
||||||
// We make no guarantees that this code is fit for any purpose.
|
// We make no guarantees that this code is fit for any purpose.
|
||||||
// Visit http://OnJava8.com for more book information.
|
// Visit http://OnJava8.com for more book information.
|
||||||
// {CompileTimeError} (Will not compile)
|
// {WillNotCompile}
|
||||||
|
|
||||||
public class OverloadingVarargs2 {
|
public class OverloadingVarargs2 {
|
||||||
static void f(float i, Character... args) {
|
static void f(float i, Character... args) {
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
// (c)2017 MindView LLC: see Copyright.txt
|
// (c)2017 MindView LLC: see Copyright.txt
|
||||||
// We make no guarantees that this code is fit for any purpose.
|
// We make no guarantees that this code is fit for any purpose.
|
||||||
// Visit http://OnJava8.com for more book information.
|
// Visit http://OnJava8.com for more book information.
|
||||||
// {CompileTimeError} (Will not compile)
|
// {WillNotCompile}
|
||||||
|
|
||||||
public class AttemptToUseBasic {
|
public class AttemptToUseBasic {
|
||||||
Basic b = new Basic();
|
Basic b = new Basic();
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// We make no guarantees that this code is fit for any purpose.
|
// We make no guarantees that this code is fit for any purpose.
|
||||||
// Visit http://OnJava8.com for more book information.
|
// Visit http://OnJava8.com for more book information.
|
||||||
// Detecting a mistaken override using @Override
|
// Detecting a mistaken override using @Override
|
||||||
// {CompileTimeError} (Will not compile)
|
// {WillNotCompile}
|
||||||
package polymorphism;
|
package polymorphism;
|
||||||
|
|
||||||
public class PrivateOverride2 {
|
public class PrivateOverride2 {
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
// (c)2017 MindView LLC: see Copyright.txt
|
// (c)2017 MindView LLC: see Copyright.txt
|
||||||
// We make no guarantees that this code is fit for any purpose.
|
// We make no guarantees that this code is fit for any purpose.
|
||||||
// Visit http://OnJava8.com for more book information.
|
// Visit http://OnJava8.com for more book information.
|
||||||
// {CompileTimeError} (Will not compile)
|
// {WillNotCompile}
|
||||||
|
|
||||||
class Lisa extends Homer {
|
class Lisa extends Homer {
|
||||||
@Override void doh(Milhouse m) {
|
@Override void doh(Milhouse m) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user