mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 20:42:21 +02:00
Added string addition
This commit is contained in:
parent
2ea366ce89
commit
840a60697d
2 changed files with 41 additions and 0 deletions
|
@ -941,6 +941,44 @@ namespace System
|
|||
}
|
||||
}
|
||||
|
||||
public void operator+=(String str)
|
||||
{
|
||||
Append(str);
|
||||
}
|
||||
|
||||
public void operator+=(StringView sv)
|
||||
{
|
||||
Append(sv);
|
||||
}
|
||||
|
||||
public void operator+=(char8 c)
|
||||
{
|
||||
Append(c);
|
||||
}
|
||||
|
||||
public void operator+=(char32 c)
|
||||
{
|
||||
Append(c);
|
||||
}
|
||||
|
||||
[Error("String addition is not supported. Consider allocating a new string and using Append, Concat, or +=")]
|
||||
public static String operator+(String lhs, String rhs)
|
||||
{
|
||||
return lhs;
|
||||
}
|
||||
|
||||
[Error("String addition is not supported. Consider allocating a new string and using Append, Concat, or +=")]
|
||||
public static String operator+(String lhs, StringView rhs)
|
||||
{
|
||||
return lhs;
|
||||
}
|
||||
|
||||
[Error("String addition is not supported. Consider allocating a new string and using Append, Concat, or +=")]
|
||||
public static String operator+(String lhs, char32 rhs)
|
||||
{
|
||||
return lhs;
|
||||
}
|
||||
|
||||
public void EnsureNullTerminator()
|
||||
{
|
||||
int allocSize = AllocSize;
|
||||
|
|
|
@ -5528,6 +5528,9 @@ BfTypedValue BfExprEvaluator::CreateCall(BfMethodMatcher* methodMatcher, BfTyped
|
|||
BF_ASSERT(castedTarget);
|
||||
target = castedTarget;
|
||||
}
|
||||
|
||||
PerformCallChecks(moduleMethodInstance.mMethodInstance, methodMatcher->mTargetSrc);
|
||||
|
||||
return CreateCall(methodMatcher->mTargetSrc, target, BfTypedValue(), methodMatcher->mBestMethodDef, moduleMethodInstance, false, methodMatcher->mArguments);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue