ソースを参照

Improved error message. Fixes #391.

woollybah 6 年 前
コミット
4b9c342023
1 ファイル変更7 行追加1 行削除
  1. 7 1
      expr.bmx

+ 7 - 1
expr.bmx

@@ -2556,7 +2556,13 @@ Type TIdentExpr Extends TExpr
 				static = expr.static
 				scope=expr.exprType.GetClass()
 				If Not scope Then
-					Err "Expression has no scope"
+					Local e:String = "Member '" + ident + "' Not found in "
+					If expr.exprType Then
+						e :+ "type '" + expr.exprType.ToString() + "'"
+					Else
+						e :+ "'" + expr.ToString() + "'"
+					End If
+					Err e
 				End If
 			End If
 			fixedScope = True