fixed build console
[groovy.git] / src / test / gls / property / MetaClassOverridingTest.groovy
blobac706540abb84dbfb10c21b6c7c1bdfdb4f89c51
1 package gls.property
3 import gls.CompilableTestSupport
5 class MetaClassOverridingTest extends CompilableTestSupport {
7 public void testOverridingMetaClassProperty() {
8 shouldCompile """
9 class A {
10 private MetaClass metaClass
12 MetaClass getMetaClass() { this.metaClass }
13 void setMetaClass(MetaClass mc) { this.metaClass = mc }
15 """
17 shouldCompile """
18 class A {
19 private MetaClass metaClass
21 void setMetaClass(MetaClass mc) { this.metaClass = mc }
23 """
25 shouldCompile """
26 class A {
27 private MetaClass metaClass
29 MetaClass getMetaClass() { this.metaClass }
31 """
33 shouldCompile """
34 class A {
35 private MetaClass metaClass
37 """