params = MkList();
ListAdd(params, MkTypeName(CopyList(propertyDef->specifiers, CopySpecifier), PlugDeclarator(propertyDef->declarator, MkDeclaratorIdentifier(MkIdentifier("value")))));
decl = MkDeclaratorFunction(MkDeclaratorIdentifier(MkIdentifier(name)), params);
-if(!propertyDef->symbol->_property || !propertyDef->symbol->_property->conversion)
+if((regClass->type == 1 || regClass->type == 6) || ((regClass->type == 5 || regClass->type == 0) && (!propertyDef->symbol->_property || !propertyDef->symbol->_property->conversion)))
ListAdd(specifiers, MkSpecifier(VOID));
else
{
-if(regClass->type == 1)
-ListAdd(specifiers, MkSpecifier(VOID));
-else
+if(regClass->type != 5 && regClass->type != 0)
+Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "set defined on type without storage for non-conversion property\n", (((void *)0))));
ListAdd(specifiers, MkSpecifierName(regClass->fullName));
}
func = MkClassFunction(specifiers, (((void *)0)), decl, (((void *)0)));
Specifier spec = tn.qualifiers ? tn.qualifiers->first : null;
if(!tn.declarator && !tn.prev && !tn.next && spec && !spec.next && spec.type == baseSpecifier && spec.specifier == VOID);
else
- Compiler_Error("parameter name omitted\n");
+ Compiler_Error($"parameter name omitted\n");
break;
}
}
MkDeclaratorIdentifier(MkIdentifier(name)), params);
// TESTING COMMENTING OUT THESE, ADDED noHeadClass here
- if(!propertyDef.symbol._property || !propertyDef.symbol._property.conversion)
+ if((regClass.type == structClass || regClass.type == unionClass) ||
+ ((regClass.type == noHeadClass || regClass.type == normalClass) && (!propertyDef.symbol._property || !propertyDef.symbol._property.conversion)))
ListAdd(specifiers, MkSpecifier(VOID));
else
{
- // Conversion property
- if(regClass.type == structClass)
- ListAdd(specifiers, MkSpecifier(VOID));
- else
- ListAdd(specifiers, MkSpecifierName(regClass.fullName));
+ if(regClass.type != noHeadClass && regClass.type != normalClass)
+ Compiler_Error($"set defined on type without storage for non-conversion property\n");
+ ListAdd(specifiers, MkSpecifierName(regClass.fullName));
}
func = MkClassFunction(specifiers, null, decl, null);
public:
property SecSince1970 global
{
- // TOFIX: 'return' with a value, in function returning void
- set { return value.local; }
get
{
#if defined(__WIN32__)
};
property SecSince1970 local
{
- // TOFIX: warning: 'return' with a value, in function returning void
- set { return value.global; }
get
{
#if defined(__WIN32__)