2
0
Эх сурвалжийг харах

Fixed null enum default arg. Fixes #523.

Brucey 5 жил өмнө
parent
commit
db48057673
1 өөрчлөгдсөн 5 нэмэгдсэн , 1 устгасан
  1. 5 1
      ctranslator.bmx

+ 5 - 1
ctranslator.bmx

@@ -5516,7 +5516,11 @@ End Rem
 		EndIf
 
 		If TEnumType(expr.exprType) Then
-			Return Expr.Eval()
+			If TCastExpr(expr) And TNullExpr(TCastExpr(expr).expr) Then
+				Return TransValue(expr.exprType, Null)
+			Else
+				Return Expr.Eval()
+			End If
 		End If
 
 		'If TObjectType(expr.exprType) And TNullDecl(TObjectType(expr.exprType).classDecl) Then