Kaynağa Gözat

Improved error message. Fixes #391.

woollybah 6 yıl önce
ebeveyn
işleme
4b9c342023
1 değiştirilmiş dosya ile 7 ekleme ve 1 silme
  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