Sfoglia il codice sorgente

Ctors do not return anything.

Brucey 5 anni fa
parent
commit
99bbb80c36
2 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 1 1
      options.bmx
  2. 1 1
      stmt.bmx

+ 1 - 1
options.bmx

@@ -25,7 +25,7 @@ SuperStrict
 
 
 Import "base.configmap.bmx"
 Import "base.configmap.bmx"
 
 
-Const version:String = "0.120"
+Const version:String = "0.121"
 
 
 Const BUILDTYPE_APP:Int = 0
 Const BUILDTYPE_APP:Int = 0
 Const BUILDTYPE_MODULE:Int = 1
 Const BUILDTYPE_MODULE:Int = 1

+ 1 - 1
stmt.bmx

@@ -282,7 +282,7 @@ Type TReturnStmt Extends TStmt
 			expr=expr.SemantAndCast( fRetType  )
 			expr=expr.SemantAndCast( fRetType  )
 			If TIdentTypeExpr(expr) Err "Function must return a value."
 			If TIdentTypeExpr(expr) Err "Function must return a value."
 		Else If fdecl.IsCtor()
 		Else If fdecl.IsCtor()
-			expr=New TSelfExpr.Semant()
+			' ctors do not return anything
 		Else If Not TVoidType( fRetType  )
 		Else If Not TVoidType( fRetType  )
 			If _env.ModuleScope().IsSuperStrict() Err "Function must return a value"
 			If _env.ModuleScope().IsSuperStrict() Err "Function must return a value"
 			expr=New TConstExpr.Create( fRetType ,"" ).Semant()
 			expr=New TConstExpr.Create( fRetType ,"" ).Semant()