소스 검색

added check for binops after inline

Nicolas Cannasse 15 년 전
부모
커밋
b82c5752bb
1개의 변경된 파일8개의 추가작업 그리고 0개의 파일을 삭제
  1. 8 0
      tests/unit/TestMisc.hx

+ 8 - 0
tests/unit/TestMisc.hx

@@ -191,4 +191,12 @@ class TestMisc extends Test {
 		eq(o.blabla,3);
 	}
 
+	static inline function foo(x) return x + 5
+
+	function testInline() {
+		// check that operations are correctly generated
+		var x = 3; // prevent optimization
+		eq( 2 * foo(x), 16 );
+	}
+
 }