This is Xamarin's bug tracking system. For product support, please use the support links listed in your Xamarin Account.
Bug 35604 - [csharp] Bad using statements break all future REPL evaluations
Summary: [csharp] Bad using statements break all future REPL evaluations
Status: RESOLVED FIXED
Alias: None
Product: Compilers
Classification: Mono
Component: C# (show other bugs)
Version: 4.0.0
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: Marek Safar
URL:
: 35559 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-11-05 18:21 UTC by Sandy Armstrong
Modified: 2015-11-16 14:47 UTC (History)
2 users (show)

See Also:
Tags:
Is this bug a regression?: ---
Last known good build:


Attachments

Description Sandy Armstrong 2015-11-05 18:21:08 UTC
As originally reported in bug #35559

1. Start csharp REPL
2. Enter "using System.DateTime"
3. Receive error for this bad using statement
4. Enter anything else, like "1+1"

Exepcted results:

New input gets evaluated.

Actual results:

using statement error repeats itself.



This bug also impacts the C# REPL in the Inspector client.



csharp example:


[sys] ~/xam-git/inspector (stupidquotes)
$ mono --version
Mono JIT compiler version 4.2.1 (explicit/8862921 Thu Oct 29 17:09:16 EDT 2015)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
	TLS:           normal
	SIGSEGV:       altstack
	Notification:  kqueue
	Architecture:  x86
	Disabled:      none
	Misc:          softdebug
	LLVM:          yes(3.6.0svn-mono-(detached/a173357)
	GC:            sgen
[sys] ~/xam-git/inspector (stupidquotes)
$ csharp
Mono C# Shell, type "help;" for help

Enter statements below.
csharp> 1+1
2
csharp> using System.DateTime;
(1,2): error CS0138: A `using' directive can only be applied to namespaces but `System.DateTime' denotes a type. Consider using a `using static' instead
/Library/Frameworks/Mono.framework/Versions/4.2.1/lib/mono/4.5/mscorlib.dll (Location of the symbol related to previous error)
csharp> 1+1
(1,2): error CS0138: A `using' directive can only be applied to namespaces but `System.DateTime' denotes a type. Consider using a `using static' instead
/Library/Frameworks/Mono.framework/Versions/4.2.1/lib/mono/4.5/mscorlib.dll (Location of the symbol related to previous error)
csharp> 1+1
(1,2): error CS0138: A `using' directive can only be applied to namespaces but `System.DateTime' denotes a type. Consider using a `using static' instead
/Library/Frameworks/Mono.framework/Versions/4.2.1/lib/mono/4.5/mscorlib.dll (Location of the symbol related to previous error)
Comment 1 Marek Safar 2015-11-10 10:39:15 UTC
Fixed in master
Comment 2 Sandy Armstrong 2015-11-16 14:47:26 UTC
*** Bug 35559 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.