Internal error: do replace type in Deviation yang

Here are three yang modules like below:

module A {
	import B {
		prefix b;
	}
	list aa {
		key a1;
		leaf a1;
		leaf a2 {
			type string;
		}
	}
}
module B {
     	list bb {
     	     key b1;
     	     leaf b1;
     	     leaf b2;
     	}
  }
module A-deviation {
	import A {
		prefix a;
	}
	import B {
		prefix b;
	}
	deviation "/a:aa/a:a2" {
		deviate replace {
			type leafref {
				path "/b:bb/b:b1"
			}
		}
	}
}

Note that i did try replace in A-deviation like

   deviation "/a:aa/a:a2" {
		deviate replace {
			type boolean;
		}
   }

which compiled success.

And i checked the rfc6020 also. There is no describtion to forbid us to do type leafref replace.
Is this an issue.

Looking forward for your reply.

After correcting the obvious syntax errors, your original modules compile just fine for me, and still does if I remove the import of B in A. Which version of ConfD are you using, and what commandline did you use for the compilation?