aBothe / Mono-D

D Add-In for MonoDevelop
http://wiki.dlang.org/Mono-D
Other
113 stars 26 forks source link

Editing issue #484

Closed Rikarin closed 10 years ago

Rikarin commented 10 years ago

When I pressed backspace IDE was thrown this exception: System.NullReferenceException: Object reference not set to an instance of an object. at D_Parser.Parser.DTokens.ContainsStorageClass(IEnumerable`1 mods) at D_Parser.Completion.CompletionProviderVisitor.Visit(DVariable n) at D_Parser.Dom.DefaultDepthFirstVisitor.Visit(DEnumValue n) at D_Parser.Dom.DEnumValue.Accept(NodeVisitor vis) at D_Parser.Completion.CompletionProviderVisitor.VisitChildren(IBlockNode block) at D_Parser.Dom.DefaultDepthFirstVisitor.VisitBlock(DBlockNode block) at D_Parser.Dom.DefaultDepthFirstVisitor.Visit(DEnum n) at D_Parser.Dom.DEnum.Accept(NodeVisitor vis) at D_Parser.Completion.CodeCompletion.GenerateCompletionData(IEditorData editor, ICompletionDataGenerator completionDataGen, Char triggerChar, Boolean alreadyCheckedCompletionContext) at MonoDevelop.D.Completion.DCodeCompletionSupport.BuildCompletionData(Document EditorDocument, DModule SyntaxTree, CodeCompletionContext ctx, CompletionDataList l, Char triggerChar) at MonoDevelop.D.DEditorCompletionExtension.HandleCodeCompletion(CodeCompletionContext completionContext, Char triggerChar, Int32& triggerWordLength) at MonoDevelop.Ide.Gui.Content.CompletionTextEditorExtension.KeyPress(Key key, Char keyChar, ModifierType modifier) at MonoDevelop.D.DEditorCompletionExtension.KeyPress(Key key, Char keyChar, ModifierType modifier) at MonoDevelop.Ide.Gui.Content.TextEditorExtension.KeyPress(Key key, Char keyChar, ModifierType modifier) at MonoDevelop.D.Formatting.Indentation.DTextEditorIndentation.KeyPress(Key key, Char keyChar, ModifierType modifier) at MonoDevelop.Ide.Gui.Content.TextEditorExtension.KeyPress(Key key, Char keyChar, ModifierType modifier) at MonoDevelop.Ide.Gui.Content.TextEditorExtension.KeyPress(Key key, Char keyChar, ModifierType modifier) at MonoDevelop.Ide.Gui.Content.TextEditorExtension.KeyPress(Key key, Char keyChar, ModifierType modifier) at MonoDevelop.Ide.Gui.Content.TextEditorExtension.KeyPress(Key key, Char keyChar, ModifierType modifier) at MonoDevelop.Ide.Gui.Content.TextEditorExtension.KeyPress(Key key, Char keyChar, ModifierType modifier) at MonoDevelop.Debugger.ExceptionCaughtTextEditorExtension.KeyPress(Key key, Char keyChar, ModifierType modifier) at MonoDevelop.SourceEditor.ExtensibleTextEditor.ExtensionKeyPress(Key key, UInt32 ch, ModifierType state)

vinesworth commented 10 years ago

@aBothe These NREs make me smile wider and wider every other time =)

aBothe commented 10 years ago

yep, I hate it, too, but what is there to do if an object's attribute may be null? Even if you ensured that such attribute will always have a non-null value, you still could break the consistency chain via casting or other techniques I'm not aware of atm..in other words: It's not only c# :P