diff options
Diffstat (limited to 'test/AbstractMethod/AbstractClass.java')
-rw-r--r-- | test/AbstractMethod/AbstractClass.java | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/AbstractMethod/AbstractClass.java b/test/AbstractMethod/AbstractClass.java new file mode 100644 index 0000000000..0f6a33e7bf --- /dev/null +++ b/test/AbstractMethod/AbstractClass.java @@ -0,0 +1,17 @@ +// Copyright 2011 Google Inc. All Rights Reserved. + +// Test case for AbstractMethodError, we will try to do a non-virtual call to +// foo. +abstract class AbstractClass { + public AbstractClass() {} + + abstract void foo(); +} + +class ConcreteClass extends AbstractClass { + public ConcreteClass() {} + + void foo() { + throw new Error("This method shouldn't be called"); + } +} |