</compile>
</ajc-test>
+ <ajc-test dir="bugs"
+ pr="53999" title="'can't bind type' message has $ for . in type name for declare soft">
+ <compile files="Cosmetic.java">
+ <message kind="error" line="9" text="can't bind type name 'unknown.Error'"/>
+ </compile>
+ </ajc-test>
</suite>
--- /dev/null
+ class Test {
+ public static void main(String[] args) {
+ test();
+ }
+ static void test() {
+ throw new Error("hello");
+ }
+ static aspect A {
+ declare soft : unknown.Error : call(void test()); // CE should be a message saying cant bind type 'unknown.Error' and not 'unknown$Error'
+ }
+}
\ No newline at end of file
}
String cleanName = maybeGetCleanName();
+ String originalName = cleanName;
if (cleanName != null) {
TypeX type;
if (requireExactType) {
if (!allowBinding) {
scope.getWorld().getMessageHandler().handleMessage(
- MessageUtil.error("can't bind type name '" + cleanName + "'",
+ MessageUtil.error("can't bind type name '" + originalName + "'",
getSourceLocation()));
} else if (scope.getWorld().getLint().invalidAbsoluteTypeName.isEnabled()) {
- scope.getWorld().getLint().invalidAbsoluteTypeName.signal(cleanName, getSourceLocation());
+ scope.getWorld().getLint().invalidAbsoluteTypeName.signal(originalName, getSourceLocation());
}
return NO;
} else if (scope.getWorld().getLint().invalidAbsoluteTypeName.isEnabled()) {
- scope.getWorld().getLint().invalidAbsoluteTypeName.signal(cleanName, getSourceLocation());
+ scope.getWorld().getLint().invalidAbsoluteTypeName.signal(originalName, getSourceLocation());
}
} else {
if (dim != 0) type = TypeX.makeArray(type, dim);