Browse Source

Merge pull request #646 from bmx-ng/task/add-ifc-gen-args

Ensure superclasses include args in ifc.
Brucey 1 year ago
parent
commit
d194679f55
3 changed files with 22 additions and 2 deletions
  1. 16 1
      ctranslator.bmx
  2. 5 0
      decl.bmx
  3. 1 1
      version.bmx

+ 16 - 1
ctranslator.bmx

@@ -5845,7 +5845,22 @@ End Rem
 	
 		Local head:String = classDecl.ident + "^"
 		If classDecl.superClass Then
-			head :+ classDecl.superClass.ident
+			Local superDecl:TClassDecl = classDecl.superClass
+
+			head :+ superDecl.ident
+
+			If superDecl.instArgs Then
+				head :+ "<"
+				Local s:String
+				For Local ty:TType = EachIn superDecl.instArgs
+					If s Then
+						s :+ ","
+					End If
+					s :+ ty.ToString()
+				Next
+				head :+ s
+				head :+ ">"
+			End If
 		Else
 			head :+ "Null"
 		End If

+ 5 - 0
decl.bmx

@@ -2072,7 +2072,12 @@ Type TFuncDecl Extends TBlockDecl
 		If argDecls.Length<>decl.argDecls.Length Return False
 		For Local i:Int=0 Until argDecls.Length
 			' ensure arg decls have been semanted
+			decl.argDecls[i].scope = decl
+			decl.argDecls[i].attrs :| DECL_INITONLY
 			decl.argDecls[i].Semant()
+
+			argDecls[i].scope = Self
+			argDecls[i].attrs :| DECL_INITONLY
 			argDecls[i].Semant()
 			
 			' objects can be subclasses as well as the same.

+ 1 - 1
version.bmx

@@ -23,4 +23,4 @@
 '
 SuperStrict
 
-Const BCC_VERSION:String = "0.142"
+Const BCC_VERSION:String = "0.143"