+2005-12-21 Maverson Eduardo Schulze Rosa <maverson@gmail.com>
+ * ecore.cs, cfold.cs: Changed for reflecting correct Error Number/Message with
+ Implict Convertions when Option Strict is On.
+
2005-12-07 Jelmer Vernooij <jelmer@samba.org>
* Makefile: allow build of only mbas, without the need to built the
class library
-REM LineNo: 19
+REM LineNo: 13
REM ExpectedError: BC30512
REM ErrorMessage: Option Strict On disallows implicit conversions from 'Double' to 'Long'.
b1 = 34.45D
End Sub
-End Module
\ No newline at end of file
+End Module
+2005-12-28 Maverson Eduardo Schulze Rosa <maverson@gmail.com>
+ * test-mbas.pl: Corrections on the Test Files Parsing
+
2005-12-15 Maverson Eduardo Schulze Rosa <maverson@gmail.com>
* test-mbas.pl: Parsing Test Files in order to find necessary
compilerOptions and generate the correct CompileCommand.
sub Command
{
my $retVal;
-# my $cmdLine = shift(@_);
- my $cmdLine = $CompileCmd;
-# $cmdLine =~ s/MONO_PATH="/MONO_PATH="$mbasPath\/Test\/dlls\/:/;
-
+ my $cmdLine = shift(@_);
+ $cmdLine =~ s/MONO_PATH="/MONO_PATH="$mbasPath\/Test\/dlls\/:/;
+
open SAVEOUT, ">&STDOUT";
open SAVEERR, ">&STDERR";
return null;
try {
+ if (Mono.MonoBASIC.Parser.OptionStrict && (!(left is LongConstant) && !(left is IntConstant)) )
+ {
+ Expression.Error_CannotConvertTypeStrict (left.Type, Type.GetType("System.Int64"), loc);
+
+ return null;
+ }
+
if (left is DoubleConstant) {
long left_val, right_val, res;
left_val = (long) ((DoubleConstant) left).Value;
// Report.Error (30512, loc, msg);
}
+ static public void Error_CannotConvertTypeStrict (Type source, Type target, Location loc)
+ {
+ Report.Error (
+ 30512, loc, "Cannot convert implicitly from '" +
+ TypeManager.MonoBASIC_Name (source) + "' to '" +
+ TypeManager.MonoBASIC_Name (target) + "' with Option Strict On.");
+ }
+
/// <summary>
/// Attemptes to implicityly convert 'target' into 'type', using
/// ConvertImplicit. If there is no implicit conversion, then