Bug 318392 (MONO75404) - Compilation fails: MyMethod vs. MyMethod()
Summary: Compilation fails: MyMethod vs. MyMethod()
Status: RESOLVED MOVED
Alias: MONO75404
Product: Mono: Compilers
Classification: Mono
Component: Basic (show other bugs)
Version: 1.1
Hardware: Other Other
: P3 - Medium : Major
Target Milestone: ---
Assignee: Mono Bugs
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-28 14:16 UTC by Jochen Wezel
Modified: 2007-09-15 21:24 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Wiest 2007-09-15 19:23:26 UTC


---- Reported by jwezel@compumaster.de 2005-06-28 07:16:50 MST ----

Description of Problem:
When a procedure doesn't need any parameters and you call it without 
parenthesis like "MyMethod" instead of "MyMethod()", you'll run into 
compilation errors in the next lines of your code

Steps to reproduce the problem:
1. Take this script code:
[root@lwezel temp]# cat test.vb
Option Explicit On
Option Strict Off

imports System
 Imports System.Collections
Imports System.Collections.Specialized
Imports System.Configuration
 Imports System.Text
 Imports System.Text.RegularExpressions
 Imports System.Web
 Imports System.Web.Caching
imports System.Web.Security
Imports System.Web.SessionState
 Imports System.Web.UI
 Imports System.Web.UI.WebControls
Imports System.Web.UI.HtmlControls

 Namespace ASP
     Public Class access_error_aspx



         Private Shared __intialized As Boolean = false

      Private Shared __autoHandlers As Integer





         Public Sub New()
            MyBase.New
             If ASP.access_error_aspx.__intialized = false Then
                ASP.access_error_aspx.__intialized = true
            End If
         End Sub

         Protected Property AutoHandlers As Integer
             Get
                Return ASP.access_error_aspx.__autoHandlers
            End Get
             Set
               ASP.access_error_aspx.__autoHandlers = Value
             End Set
         End Property

end class
end namespace
[root@lwezel temp]#

2. Compile it with 
[root@lwezel temp]# mbas test.vb /target:library

Actual Results:
MonoBASIC Compiler  0.96.2.0 - (c)2002, 2003, 2004, 2005 Rafael Teixeira
--------
THIS IS AN ALPHA SOFTWARE.
--------
syntax error, got token `EOL'
test.vb(32,0) error BC30201: Expression expected
test.vb(33,54) error BC30201: Expression expected
test.vb(35,16) error BC30087: 'End If' is not having  a corresponding 'If'
syntax error, got token `PROPERTY'
test.vb(38,26) error BC29999: Parsing error
Compilation failed: 4 Error(s), 0 warnings


Expected Results:
            MyBase.New
and 
            MyBase.New()
should be the very same
No errors should happen when the parenthesis are missing



How often does this happen? 
Always

Additional Information:
Mono 1.1.8 from 2005-06-28



---- Additional Comments From jwezel@compumaster.de 2005-06-28 07:23:02 MST ----



*** This bug has been marked as a duplicate of https://bugzilla.novell.com/show_bug.cgi?id=MONO74670 ***


Unknown operating system unknown. Setting to default OS "Other".
This bug was marked DUPLICATE in the database it was moved from.
    Changing resolution to "MOVED"