Browse Source

test code generation for SELF

Vladislav Folts 11 years ago
parent
commit
83205b259a
2 changed files with 7 additions and 1 deletions
  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.