소스 검색

globdec-use testcase moved from xfail to success.

Even though the global variable is defined after the function
definition where it is used, the function has complete visibility of
its surrounding scope. So this test should succeed.
Simon Polstra 10 년 전
부모
커밋
cfb5991610
2개의 변경된 파일과 5개의 추가작업 그리고 5개의 파일을 삭제
  1. 0 5
      test/basic/check_error/forward_globaldec.cvc
  2. 5 0
      test/basic/check_success/scope_of_globdec.cvc

+ 0 - 5
test/basic/check_error/forward_globaldec.cvc

@@ -1,5 +0,0 @@
-int foo() {
-    return glob;  // glob is not yet defined here
-}
-
-int glob;

+ 5 - 0
test/basic/check_success/scope_of_globdec.cvc

@@ -0,0 +1,5 @@
+int foo() {
+    return glob;  // OK, surrounding scope is fully visible.
+}
+
+int glob;