فهرست منبع

Revert Type.isCompatible implementation to not check for implicit cast config

Lucas de Souza 5 سال پیش
والد
کامیت
21828973dc
1فایلهای تغییر یافته به همراه1 افزوده شده و 11 حذف شده
  1. 1 11
      js/typeSystem/type.js

+ 1 - 11
js/typeSystem/type.js

@@ -1,5 +1,4 @@
 import { Config } from "../util/config";
-import { Types } from "./types";
 import { BaseTypes } from "./baseTypes";
 
 export class Type {
@@ -22,16 +21,7 @@ export class Type {
 
   isCompatible (another) {
     if(another instanceof Type) {
-      let result = this.baseType.isCompatible(another.baseType);
-      if(result) {
-        return true;
-      } else if(Config.enable_type_casting) {
-        if (this.baseType === BaseTypes.INTEGER || this.baseType === BaseTypes.REAL) {
-          if (another.baseType === BaseTypes.INTEGER || another.baseType === BaseTypes.REAL) {
-            return true;
-          }
-        }
-      }
+      return this.baseType.isCompatible(another.baseType);
     }
     return false;
   }