This is Xamarin's bug tracking system. For product support, please use the support links listed in your Xamarin Account.
Bug 43400 - "using static" dependent on compile order
Summary: "using static" dependent on compile order
Status: RESOLVED FIXED
Alias: None
Product: Compilers
Classification: Mono
Component: C# (show other bugs)
Version: 4.4.2 (C7SR1)
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Marek Safar
URL:
Depends on:
Blocks:
 
Reported: 2016-08-16 01:39 UTC by yufeih
Modified: 2016-08-16 12:13 UTC (History)
2 users (show)

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


Attachments

Description yufeih 2016-08-16 01:39:53 UTC
Originally posted here: http://forums.xamarin.com/discussion/73275/xamarin-ios-compiler-bug-with-using-static



Here is the repo project: https://github.com/yufeih/xamarin_ios_using_static_bug/tree/master
It compiles in visual studio. But xamarin studio on mac produces the following error:
Error CS0117: `Nine.UI.BuggyLayoutBuilder<int>' does not contain a definition for `Dock' (CS0117) (using_static_bug)
This only occurs when:
The class is a generic class
A "using static" statement is declared
The source file order in csproj matters. In the repro project, Buggy.cs is declared before AppDelegate.cs, if you swap the order of these 2 files, the error goes away.
Detailed xamarin version:
Xamarin Studio Community
Version 6.0.2 (build 73)
Installation UUID: 1ba755cf-c07b-494e-9378-97ad60ccfdb3
Runtime:
    Mono 4.4.2 (mono-4.4.0-branch-c7sr1/f72fe45) (64-bit)
    GTK+ 2.24.23 (Raleigh theme)

    Package version: 404020011

Xamarin.Profiler
Not Installed

Apple Developer Tools
Xcode 7.3.1 (10188.1)
Build 7D1014

Xamarin.iOS
Version: 9.8.2.22 (Xamarin Studio Community)
Hash: f37444a
Branch: cycle7-sr1
Build date: 2016-07-28 12:17:02-0400

Xamarin.Mac
Version: 2.8.2.22 (Xamarin Studio Community)

Xamarin.Android
Not Installed

Xamarin Android Player
Not Installed

Build Information
Release ID: 600020073
Git revision: a6f7a24a9723a2d4f5d33c176615b0d44703ab5b
Build date: 2016-07-26 13:36:15-04
Xamarin addins: f5acb37866a0141bc5ddbe95118f18dae4014568
Build lane: monodevelop-lion-cycle7-sr1

Operating System
Mac OS X 10.11.6
Darwin  15.6.0 Darwin Kernel Version 15.6.0
    Thu Jun 23 18:25:34 PDT 2016
    root:xnu-3248.60.10~1/RELEASE_X86_64 x86_64
Comment 1 Marek Safar 2016-08-16 12:13:03 UTC
Fixed in master and Mono 4.6

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