From a0841a83323a82e3bed3d0b5f2e6ec3795f496be Mon Sep 17 00:00:00 2001 From: Ian Rogers Date: Thu, 22 Sep 2011 14:16:31 -0700 Subject: Abstract Method Error unit test and fixes. Change-Id: I14015ffd9f8adca9d0b2d90b91811c920b13716d --- test/AbstractMethod/AbstractClass.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 test/AbstractMethod/AbstractClass.java (limited to 'test/AbstractMethod/AbstractClass.java') 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"); + } +} -- cgit v1.2.3-59-g8ed1b