diff --git a/src/org/rascalmpl/core/library/B.rsc b/src/org/rascalmpl/core/library/B.rsc index 9caa6260..89162c1b 100644 --- a/src/org/rascalmpl/core/library/B.rsc +++ b/src/org/rascalmpl/core/library/B.rsc @@ -1,5 +1,18 @@ module B -extend A; -syntax B = A+; \ No newline at end of file +import ParseTree; + +//syntax B = 'b'; +// +//void X(B t) { +// if (t.src != |unkown:///|) { // gaat goed +// throw ""; +// } +//} + +void X(Tree t2) { + if (t2.src != |unkown:///|) { // error + throw ""; + } +} \ No newline at end of file diff --git a/src/org/rascalmpl/core/library/lang/rascalcore/check/RascalConfig.rsc b/src/org/rascalmpl/core/library/lang/rascalcore/check/RascalConfig.rsc index d845c967..da175d24 100644 --- a/src/org/rascalmpl/core/library/lang/rascalcore/check/RascalConfig.rsc +++ b/src/org/rascalmpl/core/library/lang/rascalcore/check/RascalConfig.rsc @@ -191,13 +191,22 @@ AType rascalGetTypeInTypeFromDefine(Define containerDef, str selectorName, set[I //println("rascalGetTypeInTypeFromDefine: , "); //println("commonKeywordFields: "); containerType = s.getType(containerDef.defined); - if(fieldId() in idRolesSel && selectorName == "top" && isStartNonTerminalType(containerType)){ + if( fieldId() in idRolesSel + && selectorName == "top" + && isStartNonTerminalType(containerType) + ){ return getStartNonTerminalType(containerType); } - if(fieldId() in idRolesSel && selectorName == "top" && isTreeType(containerType)){ + if( fieldId() in idRolesSel + && selectorName == "top" + && isTreeType(containerType) + ){ return containerType; } - if(keywordFieldId() in idRolesSel && selectorName == "src" && isNonTerminalAType(containerType)){ + if( keywordFieldId() in idRolesSel + && selectorName == "src" + && (isTreeType(containerType) || isNonTerminalAType(containerType)) + ){ return aloc(); }