Explorar o código

test code generation for SELF

Vladislav Folts %!s(int64=11) %!d(string=hai) anos
pai
achega
83205b259a
Modificáronse 2 ficheiros con 7 adicións e 1 borrados
  1. 2 0
      test/expected/eberon/method.js
  2. 5 1
      test/input/eberon/method.ob

+ 2 - 0
test/expected/eberon/method.js

@@ -17,8 +17,10 @@ var RTL$ = {
 var m = function (){
 var T = RTL$.extend({
 	init: function T(){
+		this.i = 0;
 	}
 });
 T.prototype.p = function(){
+	this.i = 123;
 }
 }();

+ 5 - 1
test/input/eberon/method.ob

@@ -1,8 +1,12 @@
 MODULE m;
 TYPE
-    T = RECORD END;
+    T = RECORD
+		i: INTEGER
+	END;
 
 PROCEDURE T.p(), NEW;
+BEGIN
+	SELF.i := 123;
 END T.p;
 
 END m.