Skip to content

Commit 1ba676f

Browse files
committed
Added temporary fix for strings being emitted as defaults where not valid
1 parent ff127ea commit 1ba676f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Biohazrd.CSharp/Trampolines/Adapter.cs

+4
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ private protected Adapter(TranslatedParameter target)
2929
TargetDeclaration = target.Id;
3030
DefaultValue = target.DefaultValue;
3131

32+
//HACK: Don't allow bad default values (need to rework how default values work in general, see notes in Trampoline.)
33+
if (DefaultValue is StringConstant or UnsupportedConstantExpression)
34+
{ DefaultValue = null; }
35+
3236
SpecialKind = SpecialAdapterKind.None;
3337
}
3438

0 commit comments

Comments
 (0)