
|
If you were logged in you would be able to see more operations.
|
|
|
Take, for example, this general class:
class Demonstrative:
override def GetHasCode():
return 1
Here, the likely intended override GetHashCode() is not overriden, but an error is produced about the GetHasCode() method. In another example, interfaces do not require overrides, so this will also generate a warning/error:
class Illistrative(IDisposable):
override def Dispose():
pass
In both cases, an error is generated, but no suggestion as to fixes are given. Possibly use Cedric's soundex method to suggest the intended override if one exists (perhaps) in first case, and in second case, note that an interface requires the Dispose() method and give explanation 'If you intended to implement 'IDisposable.Dispose()', remove the override keyword.', or be tolerant to the override keyword in this case.
|
|
Description
|
Take, for example, this general class:
class Demonstrative:
override def GetHasCode():
return 1
Here, the likely intended override GetHashCode() is not overriden, but an error is produced about the GetHasCode() method. In another example, interfaces do not require overrides, so this will also generate a warning/error:
class Illistrative(IDisposable):
override def Dispose():
pass
In both cases, an error is generated, but no suggestion as to fixes are given. Possibly use Cedric's soundex method to suggest the intended override if one exists (perhaps) in first case, and in second case, note that an interface requires the Dispose() method and give explanation 'If you intended to implement 'IDisposable.Dispose()', remove the override keyword.', or be tolerant to the override keyword in this case. |
Show » |
Sort Order:
made changes - 09/Apr/08 11:18 AM
| Field |
Original Value |
New Value |
|
Description
|
Take, for example, this general class:
{code}
class Demonstrative:
override def GetHasCode():
return 1
{code}
Here, the likely intended override {{GetHashCode}} is not overriden, but no warning/error is produced about the {{GetHasCode}} method. In another example, interfaces do not require overrides, so this should also generate a warning/error:
{code}
class Illistrative(IDisposable):
override def Dispose():
pass
{code}
In both cases, a warning (minimum) should be generated, and possibly use Cedric's soundex method to suggest the intended override if one exists (perhaps).
|
Take, for example, this general class:
{code}
class Demonstrative:
override def GetHasCode():
return 1
{code}
Here, the likely intended override {{GetHashCode()}} is not overriden, but an error is produced about the {{GetHasCode()}} method. In another example, interfaces do not require overrides, so this will also generate a warning/error:
{code}
class Illistrative(IDisposable):
override def Dispose():
pass
{code}
In both cases, an error is generated, but no suggestion as to fixes are given. Possibly use Cedric's soundex method to suggest the intended override if one exists (perhaps) in first case, and in second case, note that an interface requires the {{Dispose()}} method and give explanation 'If you intended to implement 'IDisposable.Dispose()', remove the override keyword.', or be tolerant to the override keyword in this case.
|
|
Summary
|
Issue a warning when a function marked with 'override' doesn't override anything
|
Possibly suggest alternative when a function marked with 'override' doesn't override anything
|
made changes - 16/Jan/09 09:18 PM
|
Assignee
|
|
Cedric Vivier
[ cedricv
]
|
made changes - 22/Jan/09 09:24 AM
|
Fix Version/s
|
0.9
[ 13816
]
|
|
|
Fix Version/s
|
|
0.9.1
[ 14922
]
|
made changes - 23/Jan/09 10:52 PM
|
Status
|
Open
[ 1
]
|
In Progress
[ 3
]
|
made changes - 23/Jan/09 10:53 PM
|
Fix Version/s
|
0.9.1
[ 14922
]
|
|
|
Fix Version/s
|
|
0.9
[ 13816
]
|
|
Component/s
|
|
Compiler
[ 10940
]
|
made changes - 24/Jan/09 07:31 AM
|
Fix Version/s
|
0.9
[ 13816
]
|
|
|
Fix Version/s
|
|
0.9.1
[ 14922
]
|
made changes - 25/Jan/09 03:16 PM
|
Resolution
|
|
Fixed
[ 1
]
|
|
Fix Version/s
|
0.9.1
[ 14922
]
|
|
|
Fix Version/s
|
|
0.9
[ 13816
]
|
|
Status
|
In Progress
[ 3
]
|
Resolved
[ 5
]
|
|
Landed in rev. 3192