Skip to content

Commit

Permalink
support for object instance as a parameter default value
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubmisek committed Feb 23, 2025
1 parent 7499f84 commit 462eecb
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ bool CheckParameterDefaultValue(SourceParameterSymbol p)
return TypeCtx.IsAString(valuetype);

case PrimitiveTypeRef.PrimitiveType.@object:
return false;
return TypeCtx.IsObject(valuetype);

case PrimitiveTypeRef.PrimitiveType.@float:
case PrimitiveTypeRef.PrimitiveType.@int:
Expand All @@ -184,7 +184,7 @@ bool CheckParameterDefaultValue(SourceParameterSymbol p)
}
else if (thint is ClassTypeRef classtref)
{
return false; // cannot have default value other than NULL
//return false; // cannot have default value other than NULL
}
}
}
Expand Down

0 comments on commit 462eecb

Please sign in to comment.